Commit ba1517fa authored by Alexandre Julliard's avatar Alexandre Julliard

x11drv: Allow setting WM hints for the desktop window.

parent 1625b385
...@@ -301,10 +301,15 @@ static void set_size_hints( Display *display, struct x11drv_win_data *data, DWOR ...@@ -301,10 +301,15 @@ static void set_size_hints( Display *display, struct x11drv_win_data *data, DWOR
if ((size_hints = XAllocSizeHints())) if ((size_hints = XAllocSizeHints()))
{ {
size_hints->win_gravity = StaticGravity; size_hints->flags = 0;
size_hints->x = data->whole_rect.left;
size_hints->y = data->whole_rect.top; if (data->hwnd != GetDesktopWindow()) /* don't force position of desktop */
size_hints->flags = PWinGravity | PPosition; {
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) ) if ( !(style & WS_THICKFRAME) )
{ {
...@@ -371,6 +376,13 @@ void X11DRV_set_wm_hints( Display *display, struct x11drv_win_data *data ) ...@@ -371,6 +376,13 @@ void X11DRV_set_wm_hints( Display *display, struct x11drv_win_data *data )
HWND owner = GetWindow( data->hwnd, GW_OWNER ); HWND owner = GetWindow( data->hwnd, GW_OWNER );
char *process_name = get_process_name(); 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 */ /* transient for hint */
if (owner) if (owner)
{ {
......
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