[gnome-panel/wip-warnings-next: 15/17] multiscreen: reformat code



commit de6b1549512d6a4015c0b1abefcff58f7d1c6310
Author: Sebastian Geiger <sbastig gmx net>
Date:   Tue Feb 25 11:52:08 2020 +0100

    multiscreen: reformat code

 gnome-panel/panel-multiscreen.c | 42 +++++++++++++++++++++--------------------
 1 file changed, 22 insertions(+), 20 deletions(-)
---
diff --git a/gnome-panel/panel-multiscreen.c b/gnome-panel/panel-multiscreen.c
index 8ac96a5cf..6c6457f06 100644
--- a/gnome-panel/panel-multiscreen.c
+++ b/gnome-panel/panel-multiscreen.c
@@ -559,34 +559,36 @@ axis_distance (int p, int axis_start, int axis_size)
  * to see why. */
 int
 panel_multiscreen_get_monitor_at_point (int        x,
-                                       int        y)
+                                        int        y)
 {
-       int i;
-       int min_dist_squared;
-       int closest_monitor;
+  int i;
+  int min_dist_squared;
+  int closest_monitor;
 
-       min_dist_squared = G_MAXINT32;
-       closest_monitor = 0;
+  min_dist_squared = G_MAXINT32;
+  closest_monitor = 0;
 
-       for (i = 0; i < monitors; i++) {
-               int dist_x, dist_y;
-               int dist_squared;
+  for (i = 0; i < monitors; i++)
+    {
+      int dist_x, dist_y;
+      int dist_squared;
 
-               dist_x = axis_distance (x, geometries[i].x, geometries[i].width);
-               dist_y = axis_distance (y, geometries[i].y, geometries[i].height);
+      dist_x = axis_distance (x, geometries[i].x, geometries[i].width);
+      dist_y = axis_distance (y, geometries[i].y, geometries[i].height);
 
-               if (dist_x == 0 && dist_y == 0)
-                       return i;
+      if (dist_x == 0 && dist_y == 0)
+        return i;
 
-               dist_squared = dist_x * dist_x + dist_y * dist_y;
+      dist_squared = dist_x * dist_x + dist_y * dist_y;
 
-               if (dist_squared < min_dist_squared) {
-                       min_dist_squared = dist_squared;
-                       closest_monitor = i;
-               }
-       }
+      if (dist_squared < min_dist_squared)
+        {
+          min_dist_squared = dist_squared;
+          closest_monitor = i;
+        }
+    }
 
-       return closest_monitor;
+  return closest_monitor;
 }
 
 typedef struct {


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