From 05e11e470d26b532b5e483425e0e2cc1ad5f6e59 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 27 Oct 2017 22:20:37 +0200 Subject: [PATCH 1/1] make 'Primary' the default output The behavior is inconsistent if the value is not set. In configuration dialog the output 'Primary' is default. Handle it the same in panel. Signed-off-by: Christian Hesse --- panel/panel-window.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/panel/panel-window.c b/panel/panel-window.c index a90da2d5..49185829 100644 --- a/panel/panel-window.c +++ b/panel/panel-window.c @@ -2071,8 +2071,7 @@ panel_window_screen_layout_changed (GdkScreen *screen, } else { - if (g_strcmp0 (window->output_name, "Automatic") == 0 - || window->output_name == NULL) + if (g_strcmp0 (window->output_name, "Automatic") == 0) { /* get the monitor geometry based on the panel position */ monitor_num = gdk_screen_get_monitor_at_point (screen, window->base_x, @@ -2080,7 +2079,8 @@ panel_window_screen_layout_changed (GdkScreen *screen, gdk_screen_get_monitor_geometry (screen, monitor_num, &a); panel_return_if_fail (a.width > 0 && a.height > 0); } - else if (g_strcmp0 (window->output_name, "Primary") == 0) + else if (g_strcmp0 (window->output_name, "Primary") == 0 + || window->output_name == NULL) { normal_monitor_positioning: /* get the primary monitor */