diff options
| author | Dana Jansens <danakj@orodu.net> | 2009-11-21 16:56:07 -0500 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2009-11-21 16:56:07 -0500 |
| commit | 4bf6b1b551be744be4fbe4d1faab5be12d051378 (patch) | |
| tree | a17c1404021df31757bc53fe35914182f389c1e1 /openbox/actions/moveresizeto.c | |
| parent | c02c825cb8f18f0170b312ea8d4b3f4d491bff40 (diff) | |
| parent | ada5de28f71efaa5584709673cc49cdb3b703299 (diff) | |
Merge branch 'backport' into work
Conflicts:
openbox/popup.c
Diffstat (limited to 'openbox/actions/moveresizeto.c')
| -rw-r--r-- | openbox/actions/moveresizeto.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/openbox/actions/moveresizeto.c b/openbox/actions/moveresizeto.c index 1d9e52f1..fc171fcc 100644 --- a/openbox/actions/moveresizeto.c +++ b/openbox/actions/moveresizeto.c @@ -112,16 +112,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); |
