x11drv: Allow setting WM hints for the desktop window.

This commit is contained in:
Alexandre Julliard 2006-03-27 22:16:04 +02:00
parent 1625b385c8
commit ba1517fa80
1 changed files with 16 additions and 4 deletions

View File

@ -301,10 +301,15 @@ static void set_size_hints( Display *display, struct x11drv_win_data *data, DWOR
if ((size_hints = XAllocSizeHints()))
{
size_hints->win_gravity = StaticGravity;
size_hints->x = data->whole_rect.left;
size_hints->y = data->whole_rect.top;
size_hints->flags = PWinGravity | PPosition;
size_hints->flags = 0;
if (data->hwnd != GetDesktopWindow()) /* don't force position of desktop */
{
size_hints->win_gravity = StaticGravity;
size_hints->x = data->whole_rect.left;
size_hints->y = data->whole_rect.top;
size_hints->flags |= PWinGravity | PPosition;
}
if ( !(style & WS_THICKFRAME) )
{
@ -371,6 +376,13 @@ void X11DRV_set_wm_hints( Display *display, struct x11drv_win_data *data )
HWND owner = GetWindow( data->hwnd, GW_OWNER );
char *process_name = get_process_name();
if (data->hwnd == GetDesktopWindow())
{
/* force some styles for the desktop to get the correct decorations */
style |= WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX;
owner = 0;
}
/* transient for hint */
if (owner)
{