From 8b99f9f3604242555c071ad4fbb4834a6084dd5c Mon Sep 17 00:00:00 2001 From: Cacodemon345 Date: Mon, 1 Aug 2022 17:36:46 +0600 Subject: [PATCH] qt: avoid zero-sized main window --- src/qt/qt_mainwindow.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/qt/qt_mainwindow.cpp b/src/qt/qt_mainwindow.cpp index 144c55d2d..63e876944 100644 --- a/src/qt/qt_mainwindow.cpp +++ b/src/qt/qt_mainwindow.cpp @@ -650,6 +650,11 @@ MainWindow::~MainWindow() { void MainWindow::showEvent(QShowEvent *event) { if (shownonce) return; shownonce = true; + if (window_remember) { + if (window_w < 320) window_w = 320; + if (window_h < 200) window_h = 200; + } + if (window_remember && !QApplication::platformName().contains("wayland")) { setGeometry(window_x, window_y, window_w, window_h + menuBar()->height() + (hide_status_bar ? 0 : statusBar()->height()) + (hide_tool_bar ? 0 : ui->toolBar->height())); }