diff options
| author | Dana Jansens <danakj@orodu.net> | 2007-05-24 21:01:19 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2007-05-24 21:01:19 +0000 |
| commit | f9cf8fcea8af71268fdf3e063a96f2e3d25226d8 (patch) | |
| tree | 27143ef2f83be6d7a1f41e028d0012fc4e2e3336 | |
| parent | 33d48c5271f1aa6a11d2ae2107550ac4587a35db (diff) | |
dont give focus to transients when the situation is ambiguous
| -rw-r--r-- | openbox/client.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/openbox/client.c b/openbox/client.c index 14f44ea2..3ba8ba3b 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -486,10 +486,24 @@ void client_manage(Window window) "Not focusing the window because the time is " "too old\n"); } + /* If its a transient (and parents aren't focused) and the time + is ambiguous (either the current focus target doesn't have + a timestamp, or they are the same (we probably inherited it + from them) */ + else if (self->transient_for != NULL && + (!last_time || self->user_time == last_time)) + { + activate = FALSE; + ob_debug_type(OB_DEBUG_FOCUS, + "Not focusing the window because it is a " + "transient, and the time is very ambiguous\n"); + } /* Don't steal focus from globally active clients. I stole this idea from KWin. It seems nice. */ - if (!(focus_client->can_focus || focus_client->focus_notify)) { + else if (!(focus_client->can_focus || + focus_client->focus_notify)) + { activate = FALSE; ob_debug_type(OB_DEBUG_FOCUS, "Not focusing the window because a globally " |
