From a66cef6927c0215534cd101b5f1c9db699a615a1 Mon Sep 17 00:00:00 2001 From: Ingo Date: Tue, 6 Jan 2015 13:00:31 +0100 Subject: [PATCH] Start rt maximized when it was closed in minimized (iconified) state before, Issue 2627 --- rtgui/rtwindow.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rtgui/rtwindow.cc b/rtgui/rtwindow.cc index 76fb49a9e..f4b24ce7f 100644 --- a/rtgui/rtwindow.cc +++ b/rtgui/rtwindow.cc @@ -351,12 +351,13 @@ void RTWindow::on_realize () { } bool RTWindow::on_window_state_event(GdkEventWindowState* event) { + if (!event->new_window_state) { // Window mode options.windowMaximized = false; } - else if (event->new_window_state & (GDK_WINDOW_STATE_MAXIMIZED|GDK_WINDOW_STATE_FULLSCREEN)) { - // Fullscreen mode + else if (event->new_window_state & (GDK_WINDOW_STATE_MAXIMIZED|GDK_WINDOW_STATE_FULLSCREEN|GDK_WINDOW_STATE_ICONIFIED)) { + // Fullscreen mode, save this mode even when window is iconified (minimized) to allow easier restore, not the best solution though... options.windowMaximized = true; } return true; @@ -617,7 +618,6 @@ bool RTWindow::on_delete_event(GdkEventAny* event) { WhiteBalance::cleanup(); ProfilePanel::cleanup(); - if (!options.windowMaximized) { options.windowWidth = get_width(); options.windowHeight = get_height();