From ddd2a4da21e5696f1fc28fee6581744d888b59a7 Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Fri, 25 May 2007 15:34:31 +0000 Subject: check desktop switching stuff in screen_set_desktop --- openbox/screen.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'openbox/screen.c') diff --git a/openbox/screen.c b/openbox/screen.c index c566a908..1c058d99 100644 --- a/openbox/screen.c +++ b/openbox/screen.c @@ -536,7 +536,11 @@ void screen_set_desktop(guint num, gboolean dofocus) do this before hiding the windows so if helper windows are coming with us, they don't get hidden */ - if (dofocus && (c = focus_fallback(TRUE))) { + if (dofocus + && (!focus_client || (focus->client.desktop != DESKTOP_ALL + && focus->client.desktop != num)) + && (c = focus_fallback(TRUE))) + { /* only do the flicker reducing stuff ahead of time if we are going to call xsetinputfocus on the window ourselves. otherwise there is no guarantee the window will actually take focus.. */ -- cgit v1.2.3