correctly focus workspaces
This commit is contained in:
parent
c145f7e529
commit
6aa6fa0af0
|
@ -275,7 +275,7 @@ void tree_next(char way, orientation_t orientation) {
|
||||||
/* 3: focus choice comes in here. at the moment we will go down
|
/* 3: focus choice comes in here. at the moment we will go down
|
||||||
* until we find a window */
|
* until we find a window */
|
||||||
/* TODO: check for window, atm we only go down as far as possible */
|
/* TODO: check for window, atm we only go down as far as possible */
|
||||||
while (TAILQ_FIRST(&(next->focus_head)) != TAILQ_END(&(next->focus_head)))
|
while (!TAILQ_EMPTY(&(next->focus_head)))
|
||||||
next = TAILQ_FIRST(&(next->focus_head));
|
next = TAILQ_FIRST(&(next->focus_head));
|
||||||
|
|
||||||
con_focus(next);
|
con_focus(next);
|
||||||
|
|
|
@ -110,7 +110,12 @@ void workspace_show(const char *num) {
|
||||||
current->fullscreen_mode = CF_NONE;
|
current->fullscreen_mode = CF_NONE;
|
||||||
|
|
||||||
LOG("switching to %p\n", workspace);
|
LOG("switching to %p\n", workspace);
|
||||||
con_focus(workspace);
|
Con *next = workspace;
|
||||||
|
|
||||||
|
while (!TAILQ_EMPTY(&(next->focus_head)))
|
||||||
|
next = TAILQ_FIRST(&(next->focus_head));
|
||||||
|
|
||||||
|
con_focus(next);
|
||||||
workspace->fullscreen_mode = CF_OUTPUT;
|
workspace->fullscreen_mode = CF_OUTPUT;
|
||||||
LOG("focused now = %p / %s\n", focused, focused->name);
|
LOG("focused now = %p / %s\n", focused, focused->name);
|
||||||
#if 0
|
#if 0
|
||||||
|
|
Loading…
Reference in New Issue