desktop.c: prevent switching workspaces for always-on-bottom windows

Fixes: #1170

Reported-by: @stefonarch
Reported-by: @tsujan
This commit is contained in:
Consolatis 2023-10-14 23:42:56 +02:00
parent 50ceae5fb4
commit 4174553124
3 changed files with 4 additions and 3 deletions

View file

@ -323,6 +323,7 @@ void view_toggle_maximize(struct view *view);
void view_toggle_decorations(struct view *view); void view_toggle_decorations(struct view *view);
bool view_is_always_on_top(struct view *view); bool view_is_always_on_top(struct view *view);
bool view_is_always_on_bottom(struct view *view);
void view_toggle_always_on_top(struct view *view); void view_toggle_always_on_top(struct view *view);
void view_toggle_always_on_bottom(struct view *view); void view_toggle_always_on_bottom(struct view *view);

View file

@ -67,9 +67,9 @@ desktop_focus_view(struct view *view, bool raise)
/* /*
* Switch workspace if necessary to make the view visible * Switch workspace if necessary to make the view visible
* (unnecessary for "always on top" views). * (unnecessary for "always on {top,bottom}" views).
*/ */
if (!view_is_always_on_top(view)) { if (!view_is_always_on_top(view) && !view_is_always_on_bottom(view)) {
workspaces_switch_to(view->workspace, /*update_focus*/ false); workspaces_switch_to(view->workspace, /*update_focus*/ false);
} }

View file

@ -872,7 +872,7 @@ view_toggle_always_on_top(struct view *view)
} }
} }
static bool bool
view_is_always_on_bottom(struct view *view) view_is_always_on_bottom(struct view *view)
{ {
assert(view); assert(view);