Don't attempt to get monitor geometry on non-existent monitors
https://bugzilla.gnome.org/show_bug.cgi?id=788834
This commit is contained in:
parent
cc40a885ef
commit
6dcce19932
@ -2094,30 +2094,33 @@ meta_window_move_resize_request (MetaWindow *window,
|
|||||||
rect.width = width;
|
rect.width = width;
|
||||||
rect.height = height;
|
rect.height = height;
|
||||||
|
|
||||||
meta_screen_get_monitor_geometry (window->screen, window->monitor->number, &monitor_rect);
|
if (window->monitor)
|
||||||
|
|
||||||
/* Workaround braindead legacy apps that don't know how to
|
|
||||||
* fullscreen themselves properly - don't get fooled by
|
|
||||||
* windows which hide their titlebar when maximized or which are
|
|
||||||
* client decorated; that's not the same as fullscreen, even
|
|
||||||
* if there are no struts making the workarea smaller than
|
|
||||||
* the monitor.
|
|
||||||
*/
|
|
||||||
if (meta_prefs_get_force_fullscreen() &&
|
|
||||||
!window->hide_titlebar_when_maximized &&
|
|
||||||
(window->decorated || !meta_window_is_client_decorated (window)) &&
|
|
||||||
meta_rectangle_equal (&rect, &monitor_rect) &&
|
|
||||||
window->has_fullscreen_func &&
|
|
||||||
!window->fullscreen)
|
|
||||||
{
|
{
|
||||||
/*
|
meta_screen_get_monitor_geometry (window->screen, window->monitor->number, &monitor_rect);
|
||||||
meta_topic (META_DEBUG_GEOMETRY,
|
|
||||||
*/
|
/* Workaround braindead legacy apps that don't know how to
|
||||||
meta_warning (
|
* fullscreen themselves properly - don't get fooled by
|
||||||
"Treating resize request of legacy application %s as a "
|
* windows which hide their titlebar when maximized or which are
|
||||||
"fullscreen request\n",
|
* client decorated; that's not the same as fullscreen, even
|
||||||
window->desc);
|
* if there are no struts making the workarea smaller than
|
||||||
meta_window_make_fullscreen_internal (window);
|
* the monitor.
|
||||||
|
*/
|
||||||
|
if (meta_prefs_get_force_fullscreen() &&
|
||||||
|
!window->hide_titlebar_when_maximized &&
|
||||||
|
(window->decorated || !meta_window_is_client_decorated (window)) &&
|
||||||
|
meta_rectangle_equal (&rect, &monitor_rect) &&
|
||||||
|
window->has_fullscreen_func &&
|
||||||
|
!window->fullscreen)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
meta_topic (META_DEBUG_GEOMETRY,
|
||||||
|
*/
|
||||||
|
meta_warning (
|
||||||
|
"Treating resize request of legacy application %s as a "
|
||||||
|
"fullscreen request\n",
|
||||||
|
window->desc);
|
||||||
|
meta_window_make_fullscreen_internal (window);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
adjust_for_gravity (window, TRUE, gravity, &rect);
|
adjust_for_gravity (window, TRUE, gravity, &rect);
|
||||||
|
Loading…
Reference in New Issue
Block a user