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:
Peter Bui
2011-08-06 12:28:05 -04:00
committed by Michael Stapelberg
parent 865c193971
commit a547365a88
5 changed files with 136 additions and 2 deletions

@ -91,4 +91,10 @@ Output *get_output_containing(int x, int y);
*/
Output *get_output_most(direction_t direction, Output *current);
/**
* Gets the output which is the next one in the given direction.
*
*/
Output *get_output_next(direction_t direction, Output *current);
#endif