summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Ådahl <jadahl@gmail.com>2017-09-25 14:11:22 -0400
committerJonas Ådahl <jadahl@gmail.com>2017-10-02 18:02:19 -0400
commit6dd819a61e94023bf05b0a91c42a4c27f63eb2d9 (patch)
treef479cdc4dfd3125e31779ba432f7c374887ddd35
parent39aae19ed7e71fbe01bbb445504d580b13b0c12e (diff)
downloadmutter-6dd819a61e94023bf05b0a91c42a4c27f63eb2d9.tar.gz
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
-rw-r--r--src/core/window.c5
1 files changed, 4 insertions, 1 deletions
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);