summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrbuj <[email protected]>2022-03-16 13:31:45 +0100
committerLuke from DC <[email protected]>2022-03-18 05:37:26 +0000
commit01c6f4fef3e8522728fafee5392489e62b910dc9 (patch)
treee549fd40e10ac05675bbc100f13be8752e5f1e02
parent3860befb8776c47b680f15256326a699275ce533 (diff)
downloadmate-panel-01c6f4fef3e8522728fafee5392489e62b910dc9.tar.bz2
mate-panel-01c6f4fef3e8522728fafee5392489e62b910dc9.tar.xz
panel-multimonitor: Condition '*monitors_ret>0' is always false
-rw-r--r--mate-panel/panel-multimonitor.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/mate-panel/panel-multimonitor.c b/mate-panel/panel-multimonitor.c
index 532b31c3..b2723f12 100644
--- a/mate-panel/panel-multimonitor.c
+++ b/mate-panel/panel-multimonitor.c
@@ -240,21 +240,23 @@ static void
panel_multimonitor_get_raw_monitors (int *monitors_ret,
GdkRectangle **geometries_ret)
{
- gboolean res = FALSE;
-
*monitors_ret = 0;
*geometries_ret = NULL;
#ifdef HAVE_X11
#ifdef HAVE_RANDR
if (GDK_IS_X11_DISPLAY (gdk_display_get_default ()) && have_randr)
- res = panel_multimonitor_get_randr_monitors (monitors_ret, geometries_ret);
+ {
+ gboolean res;
+
+ res = panel_multimonitor_get_randr_monitors (monitors_ret,
+ geometries_ret);
+ if (res && *monitors_ret > 0)
+ return;
+ }
#endif /* HAVE_RANDR */
#endif /* HAVE_X11 */
- if (res && *monitors_ret > 0)
- return;
-
panel_multimonitor_get_gdk_monitors (monitors_ret, geometries_ret);
}