[gnome-panel/wip-format: 18/18] multiscreen: reformat code
- From: Sebastian Geiger <segeiger src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel/wip-format: 18/18] multiscreen: reformat code
- Date: Tue, 25 Feb 2020 19:49:11 +0000 (UTC)
commit 65c4ef42612e44eeb06063755c61bda6950c8fe7
Author: Sebastian Geiger <sbastig gmx net>
Date: Tue Feb 25 11:52:31 2020 +0100
multiscreen: reformat code
gnome-panel/panel-multiscreen.c | 89 +++++++++++++++++++++--------------------
1 file changed, 46 insertions(+), 43 deletions(-)
---
diff --git a/gnome-panel/panel-multiscreen.c b/gnome-panel/panel-multiscreen.c
index 3f7e4a434..2d9299cfa 100644
--- a/gnome-panel/panel-multiscreen.c
+++ b/gnome-panel/panel-multiscreen.c
@@ -616,48 +616,51 @@ get_monitor_bounds (int n_monitor,
*/
void
panel_multiscreen_is_at_visible_extreme (int n_monitor,
- gboolean *leftmost,
- gboolean *rightmost,
- gboolean *topmost,
- gboolean *bottommost)
+ gboolean *leftmost,
+ gboolean *rightmost,
+ gboolean *topmost,
+ gboolean *bottommost)
{
- MonitorBounds monitor;
- int i;
-
- *leftmost = TRUE;
- *rightmost = TRUE;
- *topmost = TRUE;
- *bottommost = TRUE;
-
- g_return_if_fail (n_monitor >= 0 && n_monitor < monitors);
-
- get_monitor_bounds (n_monitor, &monitor);
-
- /* go through each monitor and try to find one either right,
- * below, above, or left of the specified monitor
- */
-
- for (i = 0; i < monitors; i++) {
- MonitorBounds iter;
-
- if (i == n_monitor) continue;
-
- get_monitor_bounds (i, &iter);
-
- if ((iter.y0 >= monitor.y0 && iter.y0 < monitor.y1) ||
- (iter.y1 > monitor.y0 && iter.y1 <= monitor.y1)) {
- if (iter.x0 < monitor.x0)
- *leftmost = FALSE;
- if (iter.x1 > monitor.x1)
- *rightmost = FALSE;
- }
-
- if ((iter.x0 >= monitor.x0 && iter.x0 < monitor.x1) ||
- (iter.x1 > monitor.x0 && iter.x1 <= monitor.x1)) {
- if (iter.y0 < monitor.y0)
- *topmost = FALSE;
- if (iter.y1 > monitor.y1)
- *bottommost = FALSE;
- }
- }
+ MonitorBounds monitor;
+ int i;
+
+ *leftmost = TRUE;
+ *rightmost = TRUE;
+ *topmost = TRUE;
+ *bottommost = TRUE;
+
+ g_return_if_fail (n_monitor >= 0 && n_monitor < monitors);
+
+ get_monitor_bounds (n_monitor, &monitor);
+
+ /* go through each monitor and try to find one either right,
+ * below, above, or left of the specified monitor
+ */
+
+ for (i = 0; i < monitors; i++)
+ {
+ MonitorBounds iter;
+
+ if (i == n_monitor) continue;
+
+ get_monitor_bounds (i, &iter);
+
+ if ((iter.y0 >= monitor.y0 && iter.y0 < monitor.y1) ||
+ (iter.y1 > monitor.y0 && iter.y1 <= monitor.y1))
+ {
+ if (iter.x0 < monitor.x0)
+ *leftmost = FALSE;
+ if (iter.x1 > monitor.x1)
+ *rightmost = FALSE;
+ }
+
+ if ((iter.x0 >= monitor.x0 && iter.x0 < monitor.x1) ||
+ (iter.x1 > monitor.x0 && iter.x1 <= monitor.x1))
+ {
+ if (iter.y0 < monitor.y0)
+ *topmost = FALSE;
+ if (iter.y1 > monitor.y1)
+ *bottommost = FALSE;
+ }
+ }
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]