[gnome-panel/wip-warnings: 14/21] multiscreen: reformat code



commit 21cdc5690d2c9b74494c2feaa7f86293039a5d18
Author: Sebastian Geiger <sbastig gmx net>
Date:   Tue Feb 25 11:50:58 2020 +0100

    multiscreen: reformat code

 gnome-panel/panel-multiscreen.c | 33 +++++++++++++++++----------------
 1 file changed, 17 insertions(+), 16 deletions(-)
---
diff --git a/gnome-panel/panel-multiscreen.c b/gnome-panel/panel-multiscreen.c
index c805f6d74..7a0777d1b 100644
--- a/gnome-panel/panel-multiscreen.c
+++ b/gnome-panel/panel-multiscreen.c
@@ -438,28 +438,29 @@ panel_multiscreen_queue_reinit (void)
 static void
 panel_multiscreen_init_randr (GdkDisplay *display)
 {
-       Display *xdisplay;
-       int      event_base, error_base;
+  Display *xdisplay;
+  int      event_base, error_base;
 
-       have_randr = FALSE;
-       have_randr_1_3 = FALSE;
+  have_randr = FALSE;
+  have_randr_1_3 = FALSE;
 
-       xdisplay = GDK_DISPLAY_XDISPLAY (display);
+  xdisplay = GDK_DISPLAY_XDISPLAY (display);
 
-       /* We don't remember the event/error bases, as we expect to get "screen
-        * changed" events from GdkScreen instead.
-        */
+  /* We don't remember the event/error bases, as we expect to get "screen
+   * changed" events from GdkScreen instead.
+   */
+  if (XRRQueryExtension (xdisplay, &event_base, &error_base))
+    {
+      int major, minor;
 
-       if (XRRQueryExtension (xdisplay, &event_base, &error_base)) {
-               int major, minor;
+      XRRQueryVersion (xdisplay, &major, &minor);
 
-               XRRQueryVersion (xdisplay, &major, &minor);
-               if ((major == 1 && minor >= 2) || major > 1)
-                       have_randr = TRUE;
+      if ((major == 1 && minor >= 2) || major > 1)
+        have_randr = TRUE;
 
-               if ((major == 1 && minor >= 3) || major > 1)
-                       have_randr_1_3 = TRUE;
-       }
+      if ((major == 1 && minor >= 3) || major > 1)
+        have_randr_1_3 = TRUE;
+    }
 }
 
 void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]