diff options
author | Elijah Newren <newren@math.utah.edu> | 2004-09-22 19:15:26 +0000 |
---|---|---|
committer | Elijah Newren <newren@src.gnome.org> | 2004-09-22 19:15:26 +0000 |
commit | 7b1e57191954a817e38434b0bbfe5af56f1b5e85 (patch) | |
tree | 40e6563e9523d842d66cc42b0a9df28b9cfdb7ef /src | |
parent | 3b9ec3ce50556f2eeefd93c34c4ff855bca6b3a4 (diff) | |
download | metacity-7b1e57191954a817e38434b0bbfe5af56f1b5e85.tar.gz |
Focus the default window after the user dismisses the workspace switcher
2004-09-22 Elijah Newren <newren@math.utah.edu>
* src/keybindings.c (process_workspace_switch_grab): Focus the
default window after the user dismisses the workspace switcher
popup (fixes #123803; note that an alternate fix was made
independently by David Baron for sloppy and mouse focus users)
Diffstat (limited to 'src')
-rw-r--r-- | src/keybindings.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/keybindings.c b/src/keybindings.c index e0038792..8d364d77 100644 --- a/src/keybindings.c +++ b/src/keybindings.c @@ -2670,19 +2670,23 @@ process_workspace_switch_grab (MetaDisplay *display, meta_topic (META_DEBUG_KEYBINDINGS, "Ending workspace tab operation, primary modifier released\n"); - if (target_workspace) + + if (target_workspace == screen->active_workspace) { meta_topic (META_DEBUG_KEYBINDINGS, - "Ending grab early so we can focus the target workspace\n"); + "Ending grab so we can focus on the target workspace\n"); meta_display_end_grab_op (display, event->xkey.time); meta_topic (META_DEBUG_KEYBINDINGS, - "Activating target workspace\n"); + "Focusing default window on target workspace\n"); - meta_workspace_activate (target_workspace); + meta_workspace_focus_default_window (target_workspace, NULL); return TRUE; /* we already ended the grab */ } + + /* Workspace switching should have already occurred on KeyPress */ + meta_warning ("target_workspace != active_workspace. Some other event must have occurred.\n"); return FALSE; /* end grab */ } @@ -2753,7 +2757,10 @@ process_workspace_switch_grab (MetaDisplay *display, /* end grab */ meta_topic (META_DEBUG_KEYBINDINGS, - "Ending workspace tabbing, uninteresting key pressed\n"); + "Ending workspace tabbing & focusing default window; uninteresting key pressed\n"); + workspace = + (MetaWorkspace *) meta_ui_tab_popup_get_selected (screen->tab_popup); + meta_workspace_focus_default_window (workspace, NULL); return FALSE; } |