x11drv: Make sure to never manipulate the root window, even if we own

the desktop window.
This commit is contained in:
Alexandre Julliard 2006-03-06 21:02:59 +01:00
parent f978f615d8
commit 6d5f5447ea
2 changed files with 12 additions and 3 deletions

View File

@ -145,6 +145,7 @@ void X11DRV_sync_window_style( Display *display, struct x11drv_win_data *data )
int mask = get_window_attributes( data, &attr );
wine_tsx11_lock();
if (data->whole_window != DefaultRootWindow(display))
XChangeWindowAttributes( display, data->whole_window, mask, &attr );
wine_tsx11_unlock();
}
@ -715,7 +716,8 @@ static void destroy_whole_window( Display *display, struct x11drv_win_data *data
wine_tsx11_lock();
XSync( gdi_display, False ); /* flush any reference to this drawable in GDI queue */
XDeleteContext( display, data->whole_window, winContext );
XDestroyWindow( display, data->whole_window ); /* this destroys client too */
if (data->whole_window != DefaultRootWindow(display))
XDestroyWindow( display, data->whole_window );
data->whole_window = 0;
if (data->xic)
{

View File

@ -586,9 +586,16 @@ BOOL X11DRV_set_window_pos( HWND hwnd, HWND insert_after, const RECT *rectWindow
}
SERVER_END_REQ;
if (win == WND_DESKTOP)
if (win == WND_DESKTOP || data->whole_window == DefaultRootWindow(gdi_display))
{
data->whole_rect = data->client_rect = data->window_rect = *rectWindow;
if (win != WND_DESKTOP)
{
win->rectWindow = *rectWindow;
win->rectClient = *rectClient;
win->dwStyle = new_style;
WIN_ReleasePtr( win );
}
return ret;
}