diff options
author | Elijah Newren <newren@gmail.com> | 2006-01-15 17:03:57 +0000 |
---|---|---|
committer | Elijah Newren <newren@src.gnome.org> | 2006-01-15 17:03:57 +0000 |
commit | 9fdd3d165de566de2a8211ca33fc4828cd760690 (patch) | |
tree | ea400e237c3e9e3c90cf91cdc3f386d194a357bf /src/keybindings.c | |
parent | ef792fc1f7dec4b850fe85ba01e409ab156381c1 (diff) | |
download | metacity-9fdd3d165de566de2a8211ca33fc4828cd760690.tar.gz |
Fix accidental overzealous focus holding by the terminal introduced by the
2006-01-15 Elijah Newren <newren@gmail.com>
Fix accidental overzealous focus holding by the terminal
introduced by the original patch in bug 326159. Windows launched
from panel icons, the panel menu, or global keybindings should get
focus now. #326159.
* src/display.c (meta_display_open, event_callback):
* src/display.h (struct MetaDisplay):
* src/keybindings.c (process_event):
* src/window.c (meta_window_set_user_time):
Add a new allow_terminal_deactivation field to MetaDisplay and use
it to track whether the user's last action was interaction with
the terminal or some outside action (global keybinding, clicking
on a dock, etc.) likely to launch a new window.
* src/window.c (window_state_on_map):
Allow the focus switch from a terminal to something else if
allow_terminal_deactiviation is true.
* src/keybindings.c (handle_panel_keybinding):
Remove some unneeded code.
Diffstat (limited to 'src/keybindings.c')
-rw-r--r-- | src/keybindings.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/keybindings.c b/src/keybindings.c index 2cdd13fe..1477b7e3 100644 --- a/src/keybindings.c +++ b/src/keybindings.c @@ -1540,6 +1540,12 @@ process_event (MetaKeyBinding *bindings, "Running handler for %s\n", bindings[i].name); + /* Global keybindings count as a let-the-terminal-lose-focus + * due to new window mapping until the user starts + * interacting with the terminal again. + */ + display->allow_terminal_deactivation = TRUE; + (* handler->func) (display, screen, window, event, &bindings[i]); return; @@ -2809,13 +2815,6 @@ handle_panel_keybinding (MetaDisplay *display, break; case META_KEYBINDING_ACTION_PANEL_RUN_DIALOG: action_atom = display->atom_gnome_panel_action_run_dialog; - /* We want the dialog to take focus from a terminal since this - * should be considered an explicit focus transfer. - */ - if (__window_is_terminal (display->focus_window)) - meta_display_focus_the_no_focus_window (display, - screen, - event->xkey.time); break; default: return; |