summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core.c12
-rw-r--r--src/display.c2
2 files changed, 7 insertions, 7 deletions
diff --git a/src/core.c b/src/core.c
index 437a00972..6471969b3 100644
--- a/src/core.c
+++ b/src/core.c
@@ -275,13 +275,13 @@ meta_core_user_lower_and_unfocus (Display *xdisplay,
g_list_append (window->screen->active_workspace->mru_list,
window);
}
-
- /* focus on the (new) topmost window */
- if (window->has_focus)
- meta_workspace_focus_default_window (window->screen->active_workspace,
- window,
- timestamp);
}
+
+ /* focus the default window, if needed */
+ if (window->has_focus)
+ meta_workspace_focus_default_window (window->screen->active_workspace,
+ NULL,
+ timestamp);
}
void
diff --git a/src/display.c b/src/display.c
index 6fffee1bf..02797acf5 100644
--- a/src/display.c
+++ b/src/display.c
@@ -1784,7 +1784,7 @@ event_callback (XEvent *event,
switch (meta_prefs_get_focus_mode ())
{
case META_FOCUS_MODE_MOUSE:
- if (window->has_focus &&
+ if (window == display->expected_focus_window &&
(window->frame == NULL || frame_was_receiver) &&
event->xcrossing.mode != NotifyGrab &&
event->xcrossing.mode != NotifyUngrab &&