winex11: Only create the client window when the pixel format is changed.
This commit is contained in:
parent
e389326bdd
commit
d596b62d95
|
@ -542,7 +542,6 @@ static void dock_systray_icon( Display *display, struct tray_icon *icon, Window
|
|||
attr.background_pixmap = ParentRelative;
|
||||
attr.bit_gravity = ForgetGravity;
|
||||
XChangeWindowAttributes( display, data->whole_window, CWBackPixmap | CWBitGravity, &attr );
|
||||
XChangeWindowAttributes( display, data->client_window, CWBackPixmap | CWBitGravity, &attr );
|
||||
}
|
||||
|
||||
/* dock systray windows again with the new owner */
|
||||
|
@ -619,7 +618,7 @@ static BOOL modify_icon( struct tray_icon *icon, NOTIFYICONDATAW *nid )
|
|||
else
|
||||
{
|
||||
struct x11drv_win_data *data = X11DRV_get_win_data( icon->window );
|
||||
if (data) XClearArea( gdi_display, data->client_window, 0, 0, 0, 0, True );
|
||||
if (data) XClearArea( gdi_display, data->whole_window, 0, 0, 0, 0, True );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1697,13 +1697,6 @@ static Window create_whole_window( Display *display, struct x11drv_win_data *dat
|
|||
visual, mask, &attr );
|
||||
if (!data->whole_window) goto done;
|
||||
|
||||
if (!create_client_window( display, data, NULL ))
|
||||
{
|
||||
XDestroyWindow( display, data->whole_window );
|
||||
data->whole_window = 0;
|
||||
goto done;
|
||||
}
|
||||
|
||||
set_initial_wm_hints( display, data );
|
||||
set_wm_hints( display, data );
|
||||
|
||||
|
@ -1758,7 +1751,7 @@ static void destroy_whole_window( Display *display, struct x11drv_win_data *data
|
|||
|
||||
TRACE( "win %p xwin %lx/%lx\n", data->hwnd, data->whole_window, data->client_window );
|
||||
XDeleteContext( display, data->whole_window, winContext );
|
||||
XDeleteContext( display, data->client_window, winContext );
|
||||
if (data->client_window) XDeleteContext( display, data->client_window, winContext );
|
||||
if (!already_destroyed) XDestroyWindow( display, data->whole_window );
|
||||
data->whole_window = data->client_window = 0;
|
||||
data->wm_state = WithdrawnState;
|
||||
|
@ -1886,11 +1879,10 @@ static struct x11drv_win_data *create_desktop_win_data( Display *display, HWND h
|
|||
struct x11drv_win_data *data;
|
||||
|
||||
if (!(data = alloc_win_data( display, hwnd ))) return NULL;
|
||||
data->whole_window = data->client_window = root_window;
|
||||
data->whole_window = root_window;
|
||||
data->managed = TRUE;
|
||||
SetPropA( data->hwnd, managed_prop, (HANDLE)1 );
|
||||
SetPropA( data->hwnd, whole_window_prop, (HANDLE)root_window );
|
||||
SetPropA( data->hwnd, client_window_prop, (HANDLE)root_window );
|
||||
set_initial_wm_hints( display, data );
|
||||
return data;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue