[gtk+] Use correct size for root window with multiple monitors



commit ab13c00a38e17d239cab10292f2943014c1e547d
Author: Tor Lillqvist <tml iki fi>
Date:   Sun Oct 18 14:35:17 2009 +0300

    Use correct size for root window with multiple monitors
    
    The root window width and height have already been correctly
    initialised in _gdk_root_window_size_init() to cover all monitors, so
    don't incorrectly re-initialise using GetSystemMetrics(SM_C[XY]SCREEN)
    which only gives the size of the primary monitor anyway. (See MSDN.)
    
    This fixes at least gdk_screen_get_{width,height}() which indirectly
    affects at least the positioning of combo box pop-up menus on multiple
    monitors.

 gdk/win32/gdkwindow-win32.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/gdk/win32/gdkwindow-win32.c b/gdk/win32/gdkwindow-win32.c
index 52bd627..8942688 100644
--- a/gdk/win32/gdkwindow-win32.c
+++ b/gdk/win32/gdkwindow-win32.c
@@ -277,8 +277,7 @@ _gdk_windowing_window_init (GdkScreen *screen)
   private->y = 0;
   private->abs_x = 0;
   private->abs_y = 0;
-  private->width = GetSystemMetrics (SM_CXSCREEN);
-  private->height = GetSystemMetrics (SM_CYSCREEN);
+  /* width and height already initialised in _gdk_root_window_size_init() */
   private->viewable = TRUE;
 
   gdk_win32_handle_table_insert ((HANDLE *) &draw_impl->handle, _gdk_root);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]