Alexandre Julliard : x11drv: Allow setting WM hints for the desktop window.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Mar 27 14:50:36 CST 2006


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon Mar 27 22:16:04 2006 +0200

x11drv: Allow setting WM hints for the desktop window.

---

 dlls/x11drv/window.c |   20 ++++++++++++++++----
 1 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/dlls/x11drv/window.c b/dlls/x11drv/window.c
index e8c376d..0c36b01 100644
--- a/dlls/x11drv/window.c
+++ b/dlls/x11drv/window.c
@@ -301,10 +301,15 @@ static void set_size_hints( Display *dis
 
     if ((size_hints = XAllocSizeHints()))
     {
-        size_hints->win_gravity = StaticGravity;
-        size_hints->x = data->whole_rect.left;
-        size_hints->y = data->whole_rect.top;
-        size_hints->flags = PWinGravity | PPosition;
+        size_hints->flags = 0;
+
+        if (data->hwnd != GetDesktopWindow())  /* don't force position of desktop */
+        {
+            size_hints->win_gravity = StaticGravity;
+            size_hints->x = data->whole_rect.left;
+            size_hints->y = data->whole_rect.top;
+            size_hints->flags |= PWinGravity | PPosition;
+        }
 
         if ( !(style & WS_THICKFRAME) )
         {
@@ -371,6 +376,13 @@ void X11DRV_set_wm_hints( Display *displ
     HWND owner = GetWindow( data->hwnd, GW_OWNER );
     char *process_name = get_process_name();
 
+    if (data->hwnd == GetDesktopWindow())
+    {
+        /* force some styles for the desktop to get the correct decorations */
+        style |= WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX;
+        owner = 0;
+    }
+
     /* transient for hint */
     if (owner)
     {




More information about the wine-cvs mailing list