Implement switching focus across screens.
Modify _tree_next() so that when we reach the workspace container: 1. Find the next corresponding output (screen) using the added get_output_next(). 2. If there is another output, find the visible workspace. 3. Call workspace_show on found workspace. 4. Find the appropriate window to focus (leftmost/rightmost, etc.) using con_descend_direction, and then focus it. I've only tested on horizontal monitors (left/right).
This commit is contained in:
committed by
Michael Stapelberg
parent
865c193971
commit
a547365a88
@ -177,6 +177,14 @@ Con *con_descend_focused(Con *con);
|
||||
*/
|
||||
Con *con_descend_tiling_focused(Con *con);
|
||||
|
||||
/*
|
||||
* Returns the leftmost, rightmost, etc. container in sub-tree. For example, if
|
||||
* direction is D_LEFT, then we return the rightmost container and if direction
|
||||
* is D_RIGHT, we return the leftmost container. This is because if we are
|
||||
* moving D_LEFT, and thus want the rightmost container.
|
||||
*/
|
||||
Con *con_descend_direction(Con *con, direction_t direction);
|
||||
|
||||
/**
|
||||
* Returns a "relative" Rect which contains the amount of pixels that need to
|
||||
* be added to the original Rect to get the final position (obviously the
|
||||
|
Reference in New Issue
Block a user