Alexandre Julliard : winex11: Ignore the initial WM_STATE transition out of withdrawn state.

Alexandre Julliard julliard at winehq.org
Thu Sep 18 07:55:44 CDT 2008


Module: wine
Branch: master
Commit: ecf579b8c4425ad370a636c8edf86e2cfa47abad
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=ecf579b8c4425ad370a636c8edf86e2cfa47abad

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed Sep 17 21:13:38 2008 +0200

winex11: Ignore the initial WM_STATE transition out of withdrawn state.

---

 dlls/winex11.drv/event.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c
index b45cecf..56abd7d 100644
--- a/dlls/winex11.drv/event.c
+++ b/dlls/winex11.drv/event.c
@@ -911,16 +911,21 @@ static void handle_wm_state_notify( struct x11drv_win_data *data, XPropertyEvent
     switch(event->state)
     {
     case PropertyDelete:
+        TRACE( "%p/%lx: WM_STATE deleted from %d\n", data->hwnd, data->whole_window, data->wm_state );
         data->wm_state = WithdrawnState;
-        TRACE( "%p/%lx: WM_STATE deleted\n", data->hwnd, data->whole_window );
         break;
     case PropertyNewValue:
         {
+            int old_state = data->wm_state;
             int new_state = get_window_wm_state( event->display, data );
             if (new_state != -1 && new_state != data->wm_state)
             {
-                TRACE( "%p/%lx: new WM_STATE %d\n", data->hwnd, data->whole_window, new_state );
+                TRACE( "%p/%lx: new WM_STATE %d from %d\n",
+                       data->hwnd, data->whole_window, new_state, old_state );
                 data->wm_state = new_state;
+                /* ignore the initial state transition out of withdrawn state */
+                /* metacity does Withdrawn->NormalState->IconicState when mapping an iconic window */
+                if (!old_state) return;
             }
         }
         break;




More information about the wine-cvs mailing list