Desktop Cycle View - action: remember initial direction of

{Next,PreviouWindow}

...when cycling windows. Also make the direction-toggle when shift
is pressed relative to the initial direction. For example if W-j is
bound to PreviousWindow, subsequent key presses will continue to
cycle backwards unless shift if pressed.

added documentation for using shift/arrow keys in Next/Previous
This commit is contained in:
Droc 2024-06-25 16:53:02 -05:00
parent 2e00630d80
commit b27aa8cf40
4 changed files with 70 additions and 24 deletions

View file

@ -210,6 +210,12 @@ struct seat {
struct lab_data_buffer;
struct workspace;
enum lab_cycle_dir {
LAB_CYCLE_DIR_NONE,
LAB_CYCLE_DIR_FORWARD,
LAB_CYCLE_DIR_BACKWARD,
};
struct server {
struct wl_display *wl_display;
struct wl_event_loop *wl_event_loop; /* Can be used for timer events */
@ -349,6 +355,8 @@ struct server {
struct wlr_scene_tree *preview_parent;
struct wlr_scene_node *preview_anchor;
struct multi_rect *preview_outline;
enum lab_cycle_dir initial_direction;
bool initial_keybind_contained_shift;
} osd_state;
struct theme *theme;
@ -442,12 +450,6 @@ struct view *desktop_topmost_focusable_view(struct server *server);
*/
void desktop_update_top_layer_visiblity(struct server *server);
enum lab_cycle_dir {
LAB_CYCLE_DIR_NONE,
LAB_CYCLE_DIR_FORWARD,
LAB_CYCLE_DIR_BACKWARD,
};
/**
* desktop_cycle_view - return view to 'cycle' to
* @start_view: reference point for finding next view to cycle to