diff options
author | rbuj <[email protected]> | 2022-03-16 13:31:45 +0100 |
---|---|---|
committer | Luke from DC <[email protected]> | 2022-03-18 05:37:26 +0000 |
commit | 01c6f4fef3e8522728fafee5392489e62b910dc9 (patch) | |
tree | e549fd40e10ac05675bbc100f13be8752e5f1e02 | |
parent | 3860befb8776c47b680f15256326a699275ce533 (diff) | |
download | mate-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.c | 14 |
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); } |