diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2020-12-23 01:12:51 -0800 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2020-12-23 16:58:42 -0800 |
commit | 3161db573424a554b536aaa492397341b84683ce (patch) | |
tree | 1f72d7aa908dbb484bb8907b17bf493f551e2b85 /src/desktop.h | |
parent | a6998186a3546f9f871e2cab3e994c782bd98a98 (diff) |
*: introduce and use direction parameter
This adds a direction parameter to vwm_desktop_next{_mru}() and
vwm_win_focus_next(), deprecating _prev() variants in favor of
a vwm_direction_t parameter.
XK_r has been wired up as a modifier for reversing the direction
of actions like Mod1+Tab (window next MRU cycle) and Mod1+Space
(desktop next MRU cycle). So now if you overshoot, simply hold
the "r" key and repeat the operation to go back, much like how
Shift is often used for reversing alt+tab in i.e. Windows.
Diffstat (limited to 'src/desktop.h')
-rw-r--r-- | src/desktop.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/desktop.h b/src/desktop.h index cc6df38..c231ca5 100644 --- a/src/desktop.h +++ b/src/desktop.h @@ -1,6 +1,7 @@ #ifndef _DESKTOP_H #define _DESKTOP_H +#include "direction.h" #include "list.h" #include "window.h" @@ -18,8 +19,7 @@ void vwm_desktop_mru(vwm_t *vwm, vwm_desktop_t *desktop); int vwm_desktop_focus(vwm_t *vwm, vwm_desktop_t *desktop); vwm_desktop_t * vwm_desktop_create(vwm_t *vwm, char *name); void vwm_desktop_destroy(vwm_t *vwm, vwm_desktop_t *desktop); -vwm_desktop_t * vwm_desktop_next_mru(vwm_t *vwm, vwm_desktop_t *desktop); -vwm_desktop_t * vwm_desktop_next(vwm_t *vwm, vwm_desktop_t *desktop); -vwm_desktop_t * vwm_desktop_prev(vwm_t *vwm, vwm_desktop_t *desktop); +vwm_desktop_t * vwm_desktop_next_mru(vwm_t *vwm, vwm_desktop_t *desktop, vwm_direction_t direction); +vwm_desktop_t * vwm_desktop_next(vwm_t *vwm, vwm_desktop_t *desktop, vwm_direction_t direction); #endif |