summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Gorodnichev <[email protected]>2023-02-24 22:12:07 +0200
committerVictor Kareh <[email protected]>2026-02-09 09:40:49 -0500
commit7e6aede0af4db55a2db687bae64f5ffdbf05e92f (patch)
tree010a5d41180f0675bfadb05a2c83428c7e7df47e
parent490e2364d28aaedf3c34e3f479d817950ccaf81f (diff)
downloadmarco-7e6aede0af4db55a2db687bae64f5ffdbf05e92f.tar.bz2
marco-7e6aede0af4db55a2db687bae64f5ffdbf05e92f.tar.xz
fix switch-windows-all hotkeyHEADmaster
pass focus to window if it is on another workspace
-rw-r--r--src/core/keybindings.c6
-rw-r--r--src/core/window.c9
2 files changed, 8 insertions, 7 deletions
diff --git a/src/core/keybindings.c b/src/core/keybindings.c
index 45be2353..812a8c12 100644
--- a/src/core/keybindings.c
+++ b/src/core/keybindings.c
@@ -2106,8 +2106,6 @@ process_tab_grab (MetaDisplay *display,
target_window->desc);
display->mouse_mode = FALSE;
meta_window_activate (target_window, event->xkey.time);
- if (!target_window->on_all_workspaces)
- meta_workspace_activate (target_window->workspace, event->xkey.time);
meta_topic (META_DEBUG_KEYBINDINGS,
"Ending grab early so we can focus the target window\n");
@@ -3081,8 +3079,6 @@ do_choose_window (MetaDisplay *display,
initial_selection->desc);
display->mouse_mode = FALSE;
meta_window_activate (initial_selection, event->xkey.time);
- if (!initial_selection->on_all_workspaces)
- meta_workspace_activate (initial_selection->workspace, event->xkey.time);
}
else if (meta_display_begin_grab_op (display,
screen,
@@ -3112,8 +3108,6 @@ do_choose_window (MetaDisplay *display,
meta_display_end_grab_op (display, event->xkey.time);
display->mouse_mode = FALSE;
meta_window_activate (initial_selection, event->xkey.time);
- if (!initial_selection->on_all_workspaces)
- meta_workspace_activate (initial_selection->workspace, event->xkey.time);
}
else
{
diff --git a/src/core/window.c b/src/core/window.c
index 6781523c..134cf7bb 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -3212,6 +3212,10 @@ window_activate (MetaWindow *window,
the source window. */
meta_window_change_workspace (window, workspace);
}
+ else
+ {
+ meta_workspace_activate_with_focus(workspace, window, timestamp);
+ }
if (window->shaded)
meta_window_unshade (window, timestamp);
@@ -3236,11 +3240,14 @@ void
meta_window_activate (MetaWindow *window,
guint32 timestamp)
{
+ MetaWorkspace *workspace;
+
+ workspace = window->on_all_workspaces ? NULL : window->workspace;
/* We're not really a pager, but the behavior we want is the same as if
* we were such. If we change the pager behavior later, we could revisit
* this and just add extra flags to window_activate.
*/
- window_activate (window, timestamp, META_CLIENT_TYPE_PAGER, NULL);
+ window_activate (window, timestamp, META_CLIENT_TYPE_PAGER, workspace);
}
void