diff options
| author | Mikael Magnusson <mikachu@gmail.com> | 2009-07-05 22:27:25 +0200 |
|---|---|---|
| committer | Mikael Magnusson <mikachu@gmail.com> | 2009-09-19 15:03:12 +0200 |
| commit | 308478e4a5f4dc76d69395dda8a9bc42cb69eec4 (patch) | |
| tree | 54ec31d91428b2a7d3e4c7bdf902fe182abfc25d /openbox/actions/moveresizeto.c | |
| parent | 3f72b9d67f21781e513a9c058e8624b8b86b92ea (diff) | |
| parent | ba1ac214dfdbc0539c922e84c2318c1bf2566c0c (diff) | |
Merge branch 'backport' into work
Conflicts:
openbox/actions/desktop.c
openbox/client.c
openbox/event.c
openbox/extensions.c
openbox/popup.c
openbox/screen.c
parser/parse.c
Diffstat (limited to 'openbox/actions/moveresizeto.c')
| -rw-r--r-- | openbox/actions/moveresizeto.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/openbox/actions/moveresizeto.c b/openbox/actions/moveresizeto.c index 357c7315..3ee3498a 100644 --- a/openbox/actions/moveresizeto.c +++ b/openbox/actions/moveresizeto.c @@ -6,7 +6,9 @@ enum { CURRENT_MONITOR = -1, - ALL_MONITORS = -2 + ALL_MONITORS = -2, + NEXT_MONITOR = -3, + PREV_MONITOR = -4 }; typedef struct { @@ -84,6 +86,10 @@ static gpointer setup_func(xmlNodePtr node) if (g_ascii_strcasecmp(s, "current") != 0) { if (!g_ascii_strcasecmp(s, "all")) o->monitor = ALL_MONITORS; + else if(!g_ascii_strcasecmp(s, "next")) + o->monitor = NEXT_MONITOR; + else if(!g_ascii_strcasecmp(s, "prev")) + o->monitor = PREV_MONITOR; else o->monitor = obt_parse_node_int(n) - 1; } @@ -109,6 +115,9 @@ static gboolean run_func(ObActionsData *data, gpointer options) 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); + area = screen_area(c->desktop, mon, NULL); carea = screen_area(c->desktop, cmon, NULL); |
