From 056295a8ad05f58efc90a7874362d19cd6c42538 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Sat, 21 Nov 2009 15:16:37 -0500 Subject: [PATCH] Fix some signed/unsigned warnings (and keep stuff within 80 columns). --- openbox/actions/moveresizeto.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/openbox/actions/moveresizeto.c b/openbox/actions/moveresizeto.c index acad73b5..29780c49 100644 --- a/openbox/actions/moveresizeto.c +++ b/openbox/actions/moveresizeto.c @@ -119,16 +119,24 @@ static gboolean run_func(ObActionsData *data, gpointer options) if (data->client) { Rect *area, *carea; ObClient *c; - gint mon, cmon; + guint mon, cmon; gint x, y, lw, lh, w, h; c = data->client; mon = o->monitor; cmon = client_monitor(c); - if (mon == CURRENT_MONITOR) mon = cmon; - else if (mon == ALL_MONITORS) mon = SCREEN_AREA_ALL_MONITORS; - else if (mon == NEXT_MONITOR) mon = (cmon + 1 > screen_num_monitors - 1) ? 0 : (cmon + 1); - else if (mon == PREV_MONITOR) mon = (cmon == 0) ? (screen_num_monitors - 1) : (cmon - 1); + switch (mon) { + case CURRENT_MONITOR: + mon = cmon; break; + case ALL_MONITORS: + mon = SCREEN_AREA_ALL_MONITORS; break; + case NEXT_MONITOR: + mon = (cmon + 1 > screen_num_monitors - 1) ? 0 : (cmon + 1); break; + case PREV_MONITOR: + mon = (cmon == 0) ? (screen_num_monitors - 1) : (cmon - 1); break; + default: + g_assert_not_reached(); + } area = screen_area(c->desktop, mon, NULL); carea = screen_area(c->desktop, cmon, NULL); -- 2.45.2