From 6dd819a61e94023bf05b0a91c42a4c27f63eb2d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Mon, 25 Sep 2017 14:11:22 -0400 Subject: [PATCH] window: Don't try to auto-maximize when headless Automatic maximization is done when a window is almost the size of the work area of a monitor. This makes no sense to try when there is no monitor available, so skip trying to do this when headless. https://bugzilla.gnome.org/show_bug.cgi?id=787637 --- src/core/window.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/window.c b/src/core/window.c index d3c0fa5b5..552e8c447 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -2361,7 +2361,10 @@ meta_window_show (MetaWindow *window) if (!window->placed) { - if (meta_prefs_get_auto_maximize() && window->showing_for_first_time && window->has_maximize_func) + if (window->monitor && + meta_prefs_get_auto_maximize() && + window->showing_for_first_time && + window->has_maximize_func) { MetaRectangle work_area; meta_window_get_work_area_for_monitor (window, window->monitor->number, &work_area);