[gnome-panel/wip-warnings-next] multiscreen: reformat code
- From: Sebastian Geiger <segeiger src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel/wip-warnings-next] multiscreen: reformat code
- Date: Tue, 25 Feb 2020 10:54:23 +0000 (UTC)
commit 27aec5f4ff9785f693adfa573ab258797190cac2
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 4f166b92d..6324059f8 100644
--- a/gnome-panel/panel-multiscreen.c
+++ b/gnome-panel/panel-multiscreen.c
@@ -614,48 +614,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]