making window manager not break when attempting to shuffle single window
This commit is contained in:
parent
676cce6809
commit
be05b9b23f
1 changed files with 4 additions and 0 deletions
|
@ -265,6 +265,8 @@ void on_action(struct window_action packet) {
|
|||
struct window *old_top, *old_bottom;
|
||||
switch (i) {
|
||||
case WM_SHUFFLE_UP:
|
||||
if (!top_window->below)
|
||||
break;
|
||||
old_top = top_window;
|
||||
old_bottom = bottom_window;
|
||||
top_window = old_top->below;
|
||||
|
@ -276,6 +278,8 @@ void on_action(struct window_action packet) {
|
|||
paint_and_above(bottom_window->above);
|
||||
break;
|
||||
case WM_SHUFFLE_DOWN:
|
||||
if (!top_window->below)
|
||||
break;
|
||||
old_top = top_window;
|
||||
old_bottom = bottom_window;
|
||||
bottom_window = old_bottom->above;
|
||||
|
|
Reference in a new issue