[gnome-panel/wip-warnings-next: 20/20] multiscreen: reformat code
- From: Sebastian Geiger <segeiger src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel/wip-warnings-next: 20/20] multiscreen: reformat code
- Date: Tue, 25 Feb 2020 14:40:51 +0000 (UTC)
commit bb6f6b8b3f0bef2ca70eeb6d14b900cfe66f337d
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 b36f3197b..4fea96205 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]