]> git.mdlowis.com Git - proto/labwc.git/commitdiff
desktop.c: prevent switching workspaces for always-on-bottom windows
authorConsolatis <35009135+Consolatis@users.noreply.github.com>
Sat, 14 Oct 2023 21:42:56 +0000 (23:42 +0200)
committerConsolatis <35009135+Consolatis@users.noreply.github.com>
Sat, 14 Oct 2023 23:05:45 +0000 (01:05 +0200)
Fixes: #1170
Reported-by: @stefonarch
Reported-by: @tsujan
include/view.h
src/desktop.c
src/view.c

index d9a213acd2bd80f5af6b0a779d8f74e64e9a3f2f..09d516e5dc1f5e2e4afc58d3a0f3999a854bbadb 100644 (file)
@@ -323,6 +323,7 @@ void view_toggle_maximize(struct view *view);
 void view_toggle_decorations(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_bottom(struct view *view);
 
index f6c94dd89572246f92bdb6627428570fbc8b3d60..3672e270c9adc914ed3d2372ce00b41f9d51fa97 100644 (file)
@@ -67,9 +67,9 @@ desktop_focus_view(struct view *view, bool raise)
 
        /*
         * 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);
        }
 
index 3e27bc77ff07c712a79dc30905ad971baccf80cd..1f88327f7cd5f9f053848cfdedbc5d9f7fd3711b 100644 (file)
@@ -872,7 +872,7 @@ view_toggle_always_on_top(struct view *view)
        }
 }
 
-static bool
+bool
 view_is_always_on_bottom(struct view *view)
 {
        assert(view);