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



commit 510a2fe321f5f185708dadc7d5c70b04e4b23833
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 066fecca4..8735869a6 100644
--- a/gnome-panel/panel-multiscreen.c
+++ b/gnome-panel/panel-multiscreen.c
@@ -557,34 +557,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]