summaryrefslogtreecommitdiffstats
path: root/video/out/x11_common.c
diff options
context:
space:
mode:
authortorque <torque@1>2015-02-16 21:50:57 -0800
committerwm4 <wm4@nowhere>2015-02-18 00:03:16 +0100
commit3b269ac0a04b7575a8ab1a6665d75fc0d0e8589e (patch)
tree9b637249e3225cebe664724280a30918c0e7a8a3 /video/out/x11_common.c
parentfa9b587426d7bd350d92afdb440c396336b2ecfd (diff)
downloadmpv-3b269ac0a04b7575a8ab1a6665d75fc0d0e8589e.tar.bz2
mpv-3b269ac0a04b7575a8ab1a6665d75fc0d0e8589e.tar.xz
input: add MOUSE_ENTER keybinding.
Signed-off-by: wm4 <wm4@nowhere>
Diffstat (limited to 'video/out/x11_common.c')
-rw-r--r--video/out/x11_common.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/video/out/x11_common.c b/video/out/x11_common.c
index dcac1788a3..50a4256c8f 100644
--- a/video/out/x11_common.c
+++ b/video/out/x11_common.c
@@ -934,6 +934,9 @@ int vo_x11_check_events(struct vo *vo)
x11->win_drag_button1_down = false;
mp_input_put_key(vo->input_ctx, MP_KEY_MOUSE_LEAVE);
break;
+ case EnterNotify:
+ mp_input_put_key(vo->input_ctx, MP_KEY_MOUSE_ENTER);
+ break;
case ButtonPress:
if (Event.xbutton.button == 1)
x11->win_drag_button1_down = true;
@@ -1332,7 +1335,7 @@ static void vo_x11_map_window(struct vo *vo, struct mp_rect rc)
// map window
int events = StructureNotifyMask | ExposureMask | PropertyChangeMask |
- LeaveWindowMask;
+ LeaveWindowMask | EnterWindowMask;
if (mp_input_mouse_enabled(vo->input_ctx))
events |= PointerMotionMask | ButtonPressMask | ButtonReleaseMask;
if (mp_input_vo_keyboard_enabled(vo->input_ctx))