diff options
Diffstat (limited to 'video/out/x11_common.c')
-rw-r--r-- | video/out/x11_common.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/video/out/x11_common.c b/video/out/x11_common.c index 461ff378d0..92b3539aca 100644 --- a/video/out/x11_common.c +++ b/video/out/x11_common.c @@ -1128,11 +1128,13 @@ void vo_x11_check_events(struct vo *vo) case FocusIn: x11->has_focus = true; vo_update_cursor(vo); + x11->pending_vo_events |= VO_EVENT_FOCUS; break; case FocusOut: release_all_keys(vo); x11->has_focus = false; vo_update_cursor(vo); + x11->pending_vo_events |= VO_EVENT_FOCUS; break; case KeyRelease: release_all_keys(vo); @@ -1878,6 +1880,10 @@ int vo_x11_control(struct vo *vo, int *events, int request, void *arg) } return VO_TRUE; } + case VOCTRL_GET_FOCUSED: { + *(bool *)arg = x11->has_focus; + return VO_TRUE; + } case VOCTRL_GET_DISPLAY_NAMES: { if (!x11->pseudo_mapped) return VO_FALSE; |