From c341f555e08c6e377a37b54a03d2ec60a02c88bc Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Mon, 29 Mar 2010 20:36:35 -0400 Subject: [PATCH] if a launch time isnt there (like for client_activate) assume the window launched before the last desktop switch, not after. ie don't change desktops if you're not sure. --- openbox/client.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openbox/client.c b/openbox/client.c index 4d54b38e..5c5b765b 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -791,8 +791,9 @@ static gboolean client_can_steal_focus(ObClient *self, Time steal_time, if (!(self->desktop == screen_desktop || self->desktop == DESKTOP_ALL) && /* the timestamp is from before you changed desktops */ - launch_time && screen_desktop_user_time && - !event_time_after(launch_time, screen_desktop_user_time)) + (!launch_time || + (screen_desktop_user_time && + !event_time_after(launch_time, screen_desktop_user_time)))) { steal = FALSE; ob_debug_type(OB_DEBUG_FOCUS, -- 2.34.1