diff options
Diffstat (limited to 'src/xevent.c')
-rw-r--r-- | src/xevent.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/xevent.c b/src/xevent.c index e1b38e3..a14f37e 100644 --- a/src/xevent.c +++ b/src/xevent.c @@ -227,6 +227,19 @@ void vwm_xevent_handle_property_notify(vwm_t *vwm, XPropertyEvent *ev) } +void vwm_xevent_handle_focusin(vwm_t *vwm, XFocusInEvent *ev) +{ + vwm_window_t *vwin; + + if (ev->mode != NotifyNormal) + return; + + if ((vwin = vwm_win_lookup(vwm, ev->window)) && + (vwin != vwm_win_get_focused(vwm))) + vwm_win_set_focused(vwm, vwin); +} + + void vwm_xevent_handle_mapping_notify(vwm_t *vwm, XMappingEvent *ev) { XRefreshKeyboardMapping(ev); |