From 34d2ab14c1aba03a83cfddd43659cc49cbc0d2eb Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Thu, 28 Oct 2010 16:41:29 +0000 Subject: [PATCH] fix iconize event detection, logical operators don't work for testing bits git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65945 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/toplevel.cpp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/gtk/toplevel.cpp b/src/gtk/toplevel.cpp index 6c3104837b..18d5775a2f 100644 --- a/src/gtk/toplevel.cpp +++ b/src/gtk/toplevel.cpp @@ -380,16 +380,10 @@ gtk_frame_window_state_callback( GtkWidget* WXUNUSED(widget), GdkEventWindowState *event, wxTopLevelWindow *win ) { - - if (event->changed_mask && GDK_WINDOW_STATE_ICONIFIED) - { - if (event->new_window_state && GDK_WINDOW_STATE_ICONIFIED) - win->SetIconizeState(true); - else - win->SetIconizeState(false); - } - - return FALSE; + if (event->changed_mask & GDK_WINDOW_STATE_ICONIFIED) + win->SetIconizeState((event->new_window_state & GDK_WINDOW_STATE_ICONIFIED) != 0); + + return false; } } -- 2.45.2