mirror of
https://github.com/vale981/spectrwm
synced 2025-03-04 17:31:40 -05:00
Don't swap_to_main if no window has focus or main has focus.
This commit is contained in:
parent
0839929c3d
commit
ef5a4d70c7
1 changed files with 4 additions and 1 deletions
|
@ -371,7 +371,10 @@ swap_to_main(union arg *args)
|
|||
struct ws_win *tmpwin = TAILQ_FIRST(&ws[current_ws].winlist);
|
||||
|
||||
DNPRINTF(SWM_D_MISC, "swap_to_main: win: %lu\n",
|
||||
ws[current_ws].focus->id);
|
||||
ws[current_ws].focus ? ws[current_ws].focus->id : 0);
|
||||
|
||||
if (ws[current_ws].focus == NULL || ws[current_ws].focus == tmpwin)
|
||||
return;
|
||||
|
||||
TAILQ_REMOVE(&ws[current_ws].winlist, tmpwin, entry);
|
||||
TAILQ_INSERT_AFTER(&ws[current_ws].winlist, ws[current_ws].focus,
|
||||
|
|
Loading…
Add table
Reference in a new issue