diff options
| author | Dana Jansens <danakj@orodu.net> | 2009-12-17 16:20:03 -0500 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2009-12-18 11:40:00 -0500 |
| commit | ad812e6299223efb0cb4faee03ce99870e5c7ce5 (patch) | |
| tree | e4054f2eab685827fcb7569ff59b686ef4fd6793 /openbox/actions.c | |
| parent | 965ed8907a5dd81d5ffbc93b67a672fa78833854 (diff) | |
Add a focus option, unfocusOnLeave that removes focus from a window when the pointer leaves it
This uses the same delay to unfocus as is used for focusing on enter
Diffstat (limited to 'openbox/actions.c')
| -rw-r--r-- | openbox/actions.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/openbox/actions.c b/openbox/actions.c index 78546361..5d47b33f 100644 --- a/openbox/actions.c +++ b/openbox/actions.c @@ -408,13 +408,19 @@ void actions_client_move(ObActionsData *data, gboolean start) are ignored during a grab, so don't force fake ones when they should be ignored */ - if ((c = client_under_pointer()) && c != data->client && - !grab_on_pointer()) - { - ob_debug_type(OB_DEBUG_FOCUS, - "Generating fake enter because we did a " - "mouse-event action"); - event_enter_client(c); + if (!grab_on_pointer()) { + if ((c = client_under_pointer()) && c != data->client) { + ob_debug_type(OB_DEBUG_FOCUS, + "Generating fake enter because we did a " + "mouse-event action"); + event_enter_client(c); + } + else if (!c && c != data->client) { + ob_debug_type(OB_DEBUG_FOCUS, + "Generating fake leave because we did a " + "mouse-event action"); + event_enter_client(data->client); + } } } else if (!data->button && !config_focus_under_mouse) |
