diff options
| author | Dana Jansens <danakj@orodu.net> | 2010-09-29 15:45:37 -0400 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2011-01-24 14:19:22 -0500 |
| commit | d614bebf6a0c4b79d62cf4f703ee6a511fd0b904 (patch) | |
| tree | 1332609fb48df2b54610a1ecc9e2495834c703ae /openbox/client.c | |
| parent | e737150701337c004f8f860a7bf386d6fae9b71d (diff) | |
don't steal focus from a window if it was used very recently, when someone uses _NET_ACTIVE request.
Diffstat (limited to 'openbox/client.c')
| -rw-r--r-- | openbox/client.c | 7 |
1 files 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)) { |
