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)
This commit is contained in:
Elijah Newren 2004-09-22 19:15:26 +00:00 committed by Elijah Newren
parent 3b9ec3ce50
commit 7b1e571919
2 changed files with 19 additions and 5 deletions

View File

@ -1,3 +1,10 @@
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)
2004-09-22 Elijah Newren <newren@math.utah.edu> 2004-09-22 Elijah Newren <newren@math.utah.edu>
Fix some uninitialized variable errors reported by valgrind (see Fix some uninitialized variable errors reported by valgrind (see

View File

@ -2670,20 +2670,24 @@ process_workspace_switch_grab (MetaDisplay *display,
meta_topic (META_DEBUG_KEYBINDINGS, meta_topic (META_DEBUG_KEYBINDINGS,
"Ending workspace tab operation, primary modifier released\n"); "Ending workspace tab operation, primary modifier released\n");
if (target_workspace)
if (target_workspace == screen->active_workspace)
{ {
meta_topic (META_DEBUG_KEYBINDINGS, 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_display_end_grab_op (display, event->xkey.time);
meta_topic (META_DEBUG_KEYBINDINGS, 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 */ 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 */ return FALSE; /* end grab */
} }
@ -2753,7 +2757,10 @@ process_workspace_switch_grab (MetaDisplay *display,
/* end grab */ /* end grab */
meta_topic (META_DEBUG_KEYBINDINGS, 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; return FALSE;
} }