Commit ba926faf authored by Alexandre Julliard's avatar Alexandre Julliard

winex11: Store the window display connection in the window structure.

parent 9ac774b8
......@@ -174,14 +174,13 @@ struct desktop_resize_data
static BOOL CALLBACK update_windows_on_desktop_resize( HWND hwnd, LPARAM lparam )
{
struct x11drv_win_data *data;
Display *display = thread_display();
struct desktop_resize_data *resize_data = (struct desktop_resize_data *)lparam;
int mask = 0;
if (!(data = X11DRV_get_win_data( hwnd ))) return TRUE;
/* update the full screen state */
update_net_wm_states( display, data );
update_net_wm_states( data );
if (resize_data->old_virtual_rect.left != virtual_screen_rect.left) mask |= CWX;
if (resize_data->old_virtual_rect.top != virtual_screen_rect.top) mask |= CWY;
......@@ -191,8 +190,8 @@ static BOOL CALLBACK update_windows_on_desktop_resize( HWND hwnd, LPARAM lparam
changes.x = data->whole_rect.left - virtual_screen_rect.left;
changes.y = data->whole_rect.top - virtual_screen_rect.top;
XReconfigureWMWindow( display, data->whole_window,
DefaultScreen(display), mask, &changes );
XReconfigureWMWindow( data->display, data->whole_window,
DefaultScreen(data->display), mask, &changes );
}
if (hwnd == GetForegroundWindow()) clip_fullscreen_window( hwnd, TRUE );
return TRUE;
......
......@@ -883,7 +883,7 @@ static void X11DRV_MapNotify( HWND hwnd, XEvent *event )
{
HWND hwndFocus = GetFocus();
if (hwndFocus && IsChild( hwnd, hwndFocus ))
set_input_focus( thread_display(), data->whole_window );
set_input_focus( data->display, data->whole_window );
}
release_win_data( data );
}
......@@ -1300,12 +1300,11 @@ void wait_for_withdrawn_state( HWND hwnd, BOOL set )
*/
void CDECL X11DRV_SetFocus( HWND hwnd )
{
Display *display = thread_display();
struct x11drv_win_data *data;
if (!(hwnd = GetAncestor( hwnd, GA_ROOT ))) return;
if (!(data = get_win_data( hwnd ))) return;
if (!data->managed) set_input_focus( display, data->whole_window );
if (!data->managed) set_input_focus( data->display, data->whole_window );
release_win_data( data );
}
......
......@@ -532,6 +532,7 @@ enum x11drv_net_wm_state
/* x11drv private window data */
struct x11drv_win_data
{
Display *display; /* display connection for the thread owning the window */
HWND hwnd; /* hwnd that this private data belongs to */
Window whole_window; /* X window for the complete window */
RECT window_rect; /* USER window rectangle relative to parent */
......@@ -568,7 +569,7 @@ extern void destroy_gl_drawable( HWND hwnd ) DECLSPEC_HIDDEN;
extern void wait_for_withdrawn_state( HWND hwnd, BOOL set ) DECLSPEC_HIDDEN;
extern Window init_clip_window(void) DECLSPEC_HIDDEN;
extern void update_user_time( Time time ) DECLSPEC_HIDDEN;
extern void update_net_wm_states( Display *display, struct x11drv_win_data *data ) DECLSPEC_HIDDEN;
extern void update_net_wm_states( struct x11drv_win_data *data ) DECLSPEC_HIDDEN;
extern void make_window_embedded( HWND hwnd ) DECLSPEC_HIDDEN;
extern void change_systray_owner( Display *display, Window systray_window ) DECLSPEC_HIDDEN;
extern void update_systray_balloon_position(void) DECLSPEC_HIDDEN;
......
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