]> git.saurik.com Git - wxWidgets.git/commitdiff
fix iconize event detection, logical operators don't work for testing bits
authorPaul Cornett <paulcor@bullseye.com>
Thu, 28 Oct 2010 16:41:29 +0000 (16:41 +0000)
committerPaul Cornett <paulcor@bullseye.com>
Thu, 28 Oct 2010 16:41:29 +0000 (16:41 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65945 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/toplevel.cpp

index 6c3104837b3157f1e0d03541abd11cbbbb15a24d..18d5775a2fc73a5d5231e89189ea0b68d39485a1 100644 (file)
@@ -380,16 +380,10 @@ gtk_frame_window_state_callback( GtkWidget* WXUNUSED(widget),
                           GdkEventWindowState *event,
                           wxTopLevelWindow *win )
 {
                           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;
 }
 }
 
 }
 }