Commit cfcacdf5 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

winex11: Add a workaround for Metacity being too strict and disabling fullscreen…

winex11: Add a workaround for Metacity being too strict and disabling fullscreen support for not resizable windows.
parent d284fd97
......@@ -799,11 +799,18 @@ static void set_size_hints( Display *display, struct x11drv_win_data *data, DWOR
if ( !(style & WS_THICKFRAME) )
{
size_hints->max_width = data->whole_rect.right - data->whole_rect.left;
size_hints->max_height = data->whole_rect.bottom - data->whole_rect.top;
size_hints->min_width = size_hints->max_width;
size_hints->min_height = size_hints->max_height;
size_hints->flags |= PMinSize | PMaxSize;
/* If we restrict window resizing Metacity decides that it should
* disable fullscreen support for this window as well.
*/
if (!(data->whole_rect.left <= 0 && data->whole_rect.right >= screen_width &&
data->whole_rect.top <= 0 && data->whole_rect.bottom >= screen_height))
{
size_hints->max_width = data->whole_rect.right - data->whole_rect.left;
size_hints->max_height = data->whole_rect.bottom - data->whole_rect.top;
size_hints->min_width = size_hints->max_width;
size_hints->min_height = size_hints->max_height;
size_hints->flags |= PMinSize | PMaxSize;
}
}
XSetWMNormalHints( display, data->whole_window, size_hints );
XFree( size_hints );
......
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