Alexandre Julliard : winex11.drv: Moved initialization of screen_width/ height to xinerama_init to do it inside the x11 lock.
Alexandre Julliard
julliard at winehq.org
Fri Jan 18 06:33:54 CST 2008
Module: wine
Branch: master
Commit: c5a95025cf9efedfe182637d79b7add2740bb72f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c5a95025cf9efedfe182637d79b7add2740bb72f
Author: Alexandre Julliard <julliard at winehq.org>
Date: Thu Jan 17 19:59:22 2008 +0100
winex11.drv: Moved initialization of screen_width/height to xinerama_init to do it inside the x11 lock.
---
dlls/winex11.drv/desktop.c | 4 +---
dlls/winex11.drv/winpos.c | 4 +---
dlls/winex11.drv/x11drv.h | 2 +-
dlls/winex11.drv/x11drv_main.c | 5 +----
dlls/winex11.drv/xinerama.c | 4 ++--
5 files changed, 6 insertions(+), 13 deletions(-)
diff --git a/dlls/winex11.drv/desktop.c b/dlls/winex11.drv/desktop.c
index 1ec6a5d..23a6675 100644
--- a/dlls/winex11.drv/desktop.c
+++ b/dlls/winex11.drv/desktop.c
@@ -110,9 +110,7 @@ void X11DRV_init_desktop( Window win, unsigned int width, unsigned int height )
root_window = win;
max_width = screen_width;
max_height = screen_height;
- screen_width = width;
- screen_height = height;
- xinerama_init();
+ xinerama_init( width, height );
/* initialize the available resolutions */
dd_modes = X11DRV_Settings_SetHandlers("desktop",
diff --git a/dlls/winex11.drv/winpos.c b/dlls/winex11.drv/winpos.c
index 39ac43a..ba91e8b 100644
--- a/dlls/winex11.drv/winpos.c
+++ b/dlls/winex11.drv/winpos.c
@@ -884,9 +884,7 @@ void X11DRV_resize_desktop( unsigned int width, unsigned int height )
SetRect( &resize_data.old_screen_rect, 0, 0, screen_width, screen_height );
resize_data.old_virtual_rect = virtual_screen_rect;
- screen_width = width;
- screen_height = height;
- xinerama_init();
+ xinerama_init( width, height );
ClipCursor(NULL);
if (!(data = X11DRV_get_win_data( hwnd )))
diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h
index 6f71b75..d74dd59 100644
--- a/dlls/winex11.drv/x11drv.h
+++ b/dlls/winex11.drv/x11drv.h
@@ -731,7 +731,7 @@ extern void X11DRV_sync_window_position( Display *display, struct x11drv_win_dat
extern BOOL X11DRV_SetWindowPos( HWND hwnd, HWND insert_after, const RECT *rectWindow,
const RECT *rectClient, UINT swp_flags, const RECT *validRects );
extern void X11DRV_set_wm_hints( Display *display, struct x11drv_win_data *data );
-extern void xinerama_init(void);
+extern void xinerama_init( unsigned int width, unsigned int height );
extern void X11DRV_init_desktop( Window win, unsigned int width, unsigned int height );
extern void X11DRV_resize_desktop(unsigned int width, unsigned int height);
diff --git a/dlls/winex11.drv/x11drv_main.c b/dlls/winex11.drv/x11drv_main.c
index 11cd33a..a84c65b 100644
--- a/dlls/winex11.drv/x11drv_main.c
+++ b/dlls/winex11.drv/x11drv_main.c
@@ -528,10 +528,7 @@ static BOOL process_attach(void)
if (TRACE_ON(synchronous)) XSynchronize( display, True );
- screen_width = WidthOfScreen( screen );
- screen_height = HeightOfScreen( screen );
-
- xinerama_init();
+ xinerama_init( WidthOfScreen(screen), HeightOfScreen(screen) );
X11DRV_Settings_Init();
#ifdef HAVE_LIBXXF86VM
diff --git a/dlls/winex11.drv/xinerama.c b/dlls/winex11.drv/xinerama.c
index 75b905a..8602151 100644
--- a/dlls/winex11.drv/xinerama.c
+++ b/dlls/winex11.drv/xinerama.c
@@ -134,14 +134,14 @@ static inline int query_screens(void)
#endif /* SONAME_LIBXINERAMA */
-void xinerama_init(void)
+void xinerama_init( unsigned int width, unsigned int height )
{
MONITORINFOEXW *primary;
int i;
wine_tsx11_lock();
- SetRect( &virtual_screen_rect, 0, 0, screen_width, screen_height );
+ SetRect( &virtual_screen_rect, 0, 0, width, height );
if (root_window != DefaultRootWindow( gdi_display ) || !query_screens())
{
More information about the wine-cvs
mailing list