Alexandre Julliard : winex11: Get rid of the SetWindowPos hack to unmap systray windows.

Alexandre Julliard julliard at winehq.org
Mon Apr 7 06:50:39 CDT 2008


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon Apr  7 11:42:31 2008 +0200

winex11: Get rid of the SetWindowPos hack to unmap systray windows.

---

 dlls/winex11.drv/window.c |   23 ++++++-----------------
 1 files changed, 6 insertions(+), 17 deletions(-)

diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c
index 6e4f468..62f215c 100644
--- a/dlls/winex11.drv/window.c
+++ b/dlls/winex11.drv/window.c
@@ -730,31 +730,21 @@ void X11DRV_make_systray_window( HWND hwnd )
     {
         XEvent ev;
         unsigned long info[2];
-                
-        /* Put the window offscreen so it isn't mapped. The window _cannot_ be 
-         * mapped if we intend to dock with an XEMBED tray. If the window is 
-         * mapped when we dock, it may become visible as a child of the root 
-         * window after it docks, which isn't the proper behavior. 
-         *
-         * For more information on this problem, see
-         * http://standards.freedesktop.org/xembed-spec/latest/ar01s04.html */
-        
-        SetWindowPos( data->hwnd, NULL, virtual_screen_rect.right + 1, virtual_screen_rect.bottom + 1,
-                      0, 0, SWP_NOZORDER | SWP_NOSIZE | SWP_NOACTIVATE );
+
+        /* the window _cannot_ be mapped if we intend to dock with an XEMBED tray */
+        if (data->mapped) FIXME( "trying to dock mapped window %p\n", data->hwnd );
 
         /* set XEMBED protocol data on the window */
         info[0] = 0; /* protocol version */
         info[1] = 1; /* mapped = true */
-        
+
         wine_tsx11_lock();
         XChangeProperty( display, data->whole_window,
                          x11drv_atom(_XEMBED_INFO),
                          x11drv_atom(_XEMBED_INFO), 32, PropModeReplace,
                          (unsigned char*)info, 2 );
-        wine_tsx11_unlock();
-    
+
         /* send the docking request message */
-        ZeroMemory( &ev, sizeof(ev) ); 
         ev.xclient.type = ClientMessage;
         ev.xclient.window = systray_window;
         ev.xclient.message_type = x11drv_atom( _NET_SYSTEM_TRAY_OPCODE );
@@ -764,11 +754,10 @@ void X11DRV_make_systray_window( HWND hwnd )
         ev.xclient.data.l[2] = data->whole_window;
         ev.xclient.data.l[3] = 0;
         ev.xclient.data.l[4] = 0;
-        
-        wine_tsx11_lock();
         XSendEvent( display, systray_window, False, NoEventMask, &ev );
         wine_tsx11_unlock();
 
+        data->mapped = TRUE;
     }
     else
     {




More information about the wine-cvs mailing list