From 052a794427813dc790291d9c9a13763cf913cc9a Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Sat, 11 May 2002 02:25:11 +0000 Subject: [PATCH] if window is not mapped after the calc_showing, don't focus it, it's 2002-05-10 Havoc Pennington * src/window.c (meta_window_focus): if window is not mapped after the calc_showing, don't focus it, it's probably on another workspace or something. --- ChangeLog | 6 ++++++ src/window.c | 8 ++++++++ 2 files changed, 14 insertions(+) diff --git a/ChangeLog b/ChangeLog index 41665f95e..72a7c206a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2002-05-10 Havoc Pennington + + * src/window.c (meta_window_focus): if window is not mapped after + the calc_showing, don't focus it, it's probably on another + workspace or something. + 2002-05-09 Havoc Pennington * src/frames.c (show_tip_now): DefaultScreen() returns the screen diff --git a/src/window.c b/src/window.c index e28be25c3..180a61757 100644 --- a/src/window.c +++ b/src/window.c @@ -2663,6 +2663,14 @@ meta_window_focus (MetaWindow *window, } meta_window_flush_calc_showing (window); + + if (!window->mapped && !window->shaded) + { + meta_topic (META_DEBUG_FOCUS, + "Window %s is not showing, not focusing after all\n", + window->desc); + return; + } /* For output-only or shaded windows, focus the frame. * This seems to result in the client window getting key events