[PATCH 3/5] Prefer using SetWindowPos instead of X11DRV_SetWindowPos

Pierre d'Herbemont pdherbemont at free.fr
Tue Jan 23 09:33:09 CST 2007


This one is really more tricky. It is not necessary in the meantime but 
will be necessary in the future.

Pierre.
---
  dlls/winex11.drv/window.c |    6 ++++--
  dlls/winex11.drv/winpos.c |    6 ++++--
  2 files changed, 8 insertions(+), 4 deletions(-)
-------------- next part --------------
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c
index e9fc4f0..32720cb 100644
--- a/dlls/winex11.drv/window.c
+++ b/dlls/winex11.drv/window.c
@@ -973,8 +973,10 @@ static void get_desktop_xwin( Display *d
         SetPropA( data->hwnd, whole_window_prop, (HANDLE)root_window );
         SetPropA( data->hwnd, visual_id_prop, (HANDLE)visualid );
         data->whole_window = root_window;
-        X11DRV_SetWindowPos( data->hwnd, 0, &virtual_screen_rect, &virtual_screen_rect,
-                               SWP_NOZORDER, NULL );
+        SetWindowPos( data->hwnd, 0, virtual_screen_rect.left, virtual_screen_rect.top,
+                      virtual_screen_rect.right-virtual_screen_rect.left,
+                      virtual_screen_rect.bottom-virtual_screen_rect.top,
+                      SWP_NOZORDER );
         if (root_window != DefaultRootWindow( display ))
         {
             data->managed = TRUE;
diff --git a/dlls/winex11.drv/winpos.c b/dlls/winex11.drv/winpos.c
index 71c2855..e72b0ba 100644
--- a/dlls/winex11.drv/winpos.c
+++ b/dlls/winex11.drv/winpos.c
@@ -880,8 +880,10 @@ void X11DRV_handle_desktop_resize( unsig
     xinerama_init();
     TRACE("desktop %p change to (%dx%d)\n", hwnd, width, height);
     data->lock_changes++;
-    X11DRV_SetWindowPos( hwnd, 0, &virtual_screen_rect, &virtual_screen_rect,
-                           SWP_NOZORDER|SWP_NOMOVE, NULL );
+    SetWindowPos( hwnd, 0, virtual_screen_rect.left, virtual_screen_rect.top,
+                  virtual_screen_rect.right-virtual_screen_rect.left,
+                  virtual_screen_rect.bottom-virtual_screen_rect.top,
+                  SWP_NOZORDER|SWP_NOMOVE );
     data->lock_changes--;
     ClipCursor(NULL);
     SendMessageTimeoutW( HWND_BROADCAST, WM_DISPLAYCHANGE, screen_depth,


More information about the wine-patches mailing list