Commit c5a95025 authored by Alexandre Julliard's avatar Alexandre Julliard

winex11.drv: Moved initialization of screen_width/height to xinerama_init to do…

winex11.drv: Moved initialization of screen_width/height to xinerama_init to do it inside the x11 lock.
parent c19af910
...@@ -110,9 +110,7 @@ void X11DRV_init_desktop( Window win, unsigned int width, unsigned int height ) ...@@ -110,9 +110,7 @@ void X11DRV_init_desktop( Window win, unsigned int width, unsigned int height )
root_window = win; root_window = win;
max_width = screen_width; max_width = screen_width;
max_height = screen_height; max_height = screen_height;
screen_width = width; xinerama_init( width, height );
screen_height = height;
xinerama_init();
/* initialize the available resolutions */ /* initialize the available resolutions */
dd_modes = X11DRV_Settings_SetHandlers("desktop", dd_modes = X11DRV_Settings_SetHandlers("desktop",
......
...@@ -884,9 +884,7 @@ void X11DRV_resize_desktop( unsigned int width, unsigned int height ) ...@@ -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 ); SetRect( &resize_data.old_screen_rect, 0, 0, screen_width, screen_height );
resize_data.old_virtual_rect = virtual_screen_rect; resize_data.old_virtual_rect = virtual_screen_rect;
screen_width = width; xinerama_init( width, height );
screen_height = height;
xinerama_init();
ClipCursor(NULL); ClipCursor(NULL);
if (!(data = X11DRV_get_win_data( hwnd ))) if (!(data = X11DRV_get_win_data( hwnd )))
......
...@@ -731,7 +731,7 @@ extern void X11DRV_sync_window_position( Display *display, struct x11drv_win_dat ...@@ -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, extern BOOL X11DRV_SetWindowPos( HWND hwnd, HWND insert_after, const RECT *rectWindow,
const RECT *rectClient, UINT swp_flags, const RECT *validRects ); const RECT *rectClient, UINT swp_flags, const RECT *validRects );
extern void X11DRV_set_wm_hints( Display *display, struct x11drv_win_data *data ); 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_init_desktop( Window win, unsigned int width, unsigned int height );
extern void X11DRV_resize_desktop(unsigned int width, unsigned int height); extern void X11DRV_resize_desktop(unsigned int width, unsigned int height);
......
...@@ -528,10 +528,7 @@ static BOOL process_attach(void) ...@@ -528,10 +528,7 @@ static BOOL process_attach(void)
if (TRACE_ON(synchronous)) XSynchronize( display, True ); if (TRACE_ON(synchronous)) XSynchronize( display, True );
screen_width = WidthOfScreen( screen ); xinerama_init( WidthOfScreen(screen), HeightOfScreen(screen) );
screen_height = HeightOfScreen( screen );
xinerama_init();
X11DRV_Settings_Init(); X11DRV_Settings_Init();
#ifdef HAVE_LIBXXF86VM #ifdef HAVE_LIBXXF86VM
......
...@@ -134,14 +134,14 @@ static inline int query_screens(void) ...@@ -134,14 +134,14 @@ static inline int query_screens(void)
#endif /* SONAME_LIBXINERAMA */ #endif /* SONAME_LIBXINERAMA */
void xinerama_init(void) void xinerama_init( unsigned int width, unsigned int height )
{ {
MONITORINFOEXW *primary; MONITORINFOEXW *primary;
int i; int i;
wine_tsx11_lock(); 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()) if (root_window != DefaultRootWindow( gdi_display ) || !query_screens())
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment