summaryrefslogtreecommitdiff
path: root/src/keybindings.c
diff options
context:
space:
mode:
authorRob Adams <readams@src.gnome.org>2003-05-30 20:24:00 +0000
committerRob Adams <readams@src.gnome.org>2003-05-30 20:24:00 +0000
commit3edad8599c6f91ea86123baac08ece858bc27aa7 (patch)
tree66895895a9118dcd1c56d097f95e5b2fa987d1fa /src/keybindings.c
parent903f3d7e6e8f528d7e18ede9d5abb6beaeb06821 (diff)
downloadmetacity-3edad8599c6f91ea86123baac08ece858bc27aa7.tar.gz
CVS2003-05-29 Rob Adams <robadams@ucla.edu>
CVS2003-05-29 Rob Adams <robadams@ucla.edu> Use a new property _METACITY_SENTINEL to eliminate a race condition that causes focus to behave badly with sloppy/mouse focus when lots of windows are mapped/unmapped, such as with a workspace switch. The EnterNotify events on a display are ignored until the PropertyNotify sent after all the window maps is received. This is a fix for #110970. * src/display.[ch]: New _METACITY_SENTINEL atom. (event_callback): ignore EnterNotify if the sentinel isn't clear, and decrement the sentinel counter when the PropertyNotify is received. (meta_display_increment_focus_sentinel): new function. Increments the sentinel counter and updates the property on a root window on this display. (meta_display_decrement_focus_sentinel): Decrement the sentinel counter. (meta_display_focus_sentinel_clear): returns whether the sentinel counter is zero. * src/window.c (idle_calc_showing): after showing windows, call meta_display_increment_focus_sentinel on each display for windows to be shown. * src/workspace.[ch] (meta_workspace_activate_with_focus): new function activates a workspace and focuses a particular window after the workspace is activated. (meta_workspace_activate): now just a wrapper for meta_workspace_activate_with_focus * src/keybindings.c: use new meta_workspace_activate_with_focus function to ensure that focus will follow the focused window through the workspace switch. : ----------------------------------------------------------------------
Diffstat (limited to 'src/keybindings.c')
-rw-r--r--src/keybindings.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/keybindings.c b/src/keybindings.c
index 395b30b8..050733a7 100644
--- a/src/keybindings.c
+++ b/src/keybindings.c
@@ -3022,7 +3022,7 @@ do_handle_move_to_workspace (MetaDisplay *display,
/* Activate second, so the window is never unmapped */
meta_window_change_workspace (window, workspace);
if (flip)
- meta_workspace_activate (workspace);
+ meta_workspace_activate_with_focus (workspace, window);
}
else
{