action: remember initial direction of PreviousView

...when cycling windows. Also make the toggling of direction 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.

Add documentation for using shift/arrow keys in Next/Previous
This commit is contained in:
droc12345 2024-06-26 16:03:56 -05:00 committed by GitHub
parent 7f94486773
commit f2755a4e2e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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