[gnome-panel/wip-format: 16/18] multiscreen: reformat code
- From: Sebastian Geiger <segeiger src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel/wip-format: 16/18] multiscreen: reformat code
- Date: Tue, 25 Feb 2020 19:49:01 +0000 (UTC)
commit 877a5f35f8d5a2922c8b409775f38753f0f02368
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 e84be2a7c..0c9914540 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, monitor_geometries[i].x, monitor_geometries[i].width);
- dist_y = axis_distance (y, monitor_geometries[i].y, monitor_geometries[i].height);
+ dist_x = axis_distance (x, monitor_geometries[i].x, monitor_geometries[i].width);
+ dist_y = axis_distance (y, monitor_geometries[i].y, monitor_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]