From d614bebf6a0c4b79d62cf4f703ee6a511fd0b904 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Wed, 29 Sep 2010 15:45:37 -0400 Subject: [PATCH] don't steal focus from a window if it was used very recently, when someone uses _NET_ACTIVE request. --- openbox/client.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/openbox/client.c b/openbox/client.c index ccc64c6f..8eeb052b 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -730,9 +730,10 @@ static gboolean client_can_steal_focus(ObClient *self, /* If the user is working in another window right now, then don't steal focus */ if (!parent_focused && - event_last_user_time && launch_time && - event_time_after(event_last_user_time, launch_time) && - event_last_user_time != launch_time && + event_last_user_time && + (!launch_time || + (event_time_after(event_last_user_time, launch_time) && + event_last_user_time != launch_time)) && event_time_after(event_last_user_time, steal_time - OB_EVENT_USER_TIME_DELAY)) { -- 2.45.2