]> git.mdlowis.com Git - proto/labwc.git/commitdiff
SendToDesktop: ensure we focus the topmost view with follow=no
authorConsolatis <35009135+Consolatis@users.noreply.github.com>
Sat, 18 May 2024 17:01:02 +0000 (19:01 +0200)
committerJohan Malm <johanmalm@users.noreply.github.com>
Sun, 19 May 2024 15:19:04 +0000 (16:19 +0100)
Fixes: #1800
src/action.c

index 68086bf9eaf8aa68e0b28550d0a7b339d109a2b0..78c71d98c6d53fcf9b0444acc2da9c3030936097 100644 (file)
@@ -918,6 +918,11 @@ actions_run(struct view *activator, struct server *server,
                                if (action->type == ACTION_TYPE_SEND_TO_DESKTOP) {
                                        view_move_to_workspace(view, target);
                                        follow = action_get_bool(action, "follow", true);
+
+                                       /* Ensure that the focus is not on another desktop */
+                                       if (!follow && server->active_view == view) {
+                                               desktop_focus_topmost_view(server);
+                                       }
                                }
                                if (follow) {
                                        workspaces_switch_to(target,