summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/display.c1
-rw-r--r--src/display.h4
-rw-r--r--src/window.c28
3 files changed, 1 insertions, 32 deletions
diff --git a/src/display.c b/src/display.c
index 006f821..28b05e4 100644
--- a/src/display.c
+++ b/src/display.c
@@ -330,7 +330,6 @@ meta_display_open (const char *name)
display->autoraise_timeout_id = 0;
display->autoraise_window = NULL;
display->focus_window = NULL;
- display->previously_focused_window = NULL;
display->expected_focus_window = NULL;
#ifdef HAVE_XSYNC
diff --git a/src/display.h b/src/display.h
index a3452d5..a122c35 100644
--- a/src/display.h
+++ b/src/display.h
@@ -188,10 +188,6 @@ struct _MetaDisplay
*/
MetaWindow *focus_window;
- /* Window that was the actual window from focus events before focus_window
- */
- MetaWindow *previously_focused_window;
-
/* window we are expecting a FocusIn event for or the current focus
* window if we are not expecting any FocusIn/FocusOut events; not
* perfect because applications can call XSetInputFocus directly.
diff --git a/src/window.c b/src/window.c
index aba733f..c410a2d 100644
--- a/src/window.c
+++ b/src/window.c
@@ -950,8 +950,6 @@ meta_window_free (MetaWindow *window)
if (window->display->focus_window == window)
window->display->focus_window = NULL;
- if (window->display->previously_focused_window == window)
- window->display->previously_focused_window = NULL;
meta_window_unqueue_calc_showing (window);
meta_window_unqueue_move_resize (window);
@@ -3970,29 +3968,7 @@ meta_window_client_message (MetaWindow *window,
event->xclient.data.l[0]);
if (event->xclient.data.l[0] == IconicState &&
window->has_minimize_func)
- {
- meta_window_minimize (window);
-
- /* If the window being minimized was the one with focus,
- * then we should focus a new window. We often receive this
- * wm_change_state message when a user has clicked on the
- * tasklist on the panel; in those cases, the current
- * focus_window is the panel, but the previous focus_window
- * will have been this one. This is a special case where we
- * need to manually handle focusing a new window because
- * meta_window_minimize will get it wrong.
- */
- if (window->display->focus_window &&
- (window->display->focus_window->type == META_WINDOW_DOCK ||
- window->display->focus_window->type == META_WINDOW_DESKTOP) &&
- window->display->previously_focused_window == window)
- {
- meta_topic (META_DEBUG_FOCUS,
- "Focusing default window because of minimization of former focus window %s, which was due to a wm_change_state client message\n",
- window->desc);
- meta_workspace_focus_default_window (window->screen->active_workspace, window, meta_display_get_current_time_roundtrip (window->display));
- }
- }
+ meta_window_minimize (window);
return TRUE;
}
@@ -4296,8 +4272,6 @@ meta_window_notify_focus (MetaWindow *window,
meta_topic (META_DEBUG_FOCUS,
"* Focus --> NULL (was %s)\n", window->desc);
- window->display->previously_focused_window =
- window->display->focus_window;
window->display->focus_window = NULL;
window->has_focus = FALSE;
if (window->frame)