summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-10-15 21:49:01 +0200
committerwm4 <wm4@nowhere>2013-10-15 21:53:33 +0200
commita0485221c7a2d8c2a7b5638e4fbb386a1d23d912 (patch)
tree8666576579ef29104dcc76b72b046c0eabab380f /video
parent1b8eeeb8cc05563331ac2a76897eb168baa72e7c (diff)
downloadmpv-a0485221c7a2d8c2a7b5638e4fbb386a1d23d912.tar.bz2
mpv-a0485221c7a2d8c2a7b5638e4fbb386a1d23d912.tar.xz
x11_common: don't handle mouse enter events
This could cause the OSC to be displayed without mouse interaction: for example, starting mpv with --fs, and putting the mouse to where the OSC area is beforehand, would cause the OSC to appear and stay visible. We don't want that. The simplest solution is not generating artificial mouse move events from mouse enter events, because they make the OSC think the mouse was actually moved. Also see commit 0c7978c, where handling of mouse enter events was added. This was supposed to fix certain corner cases, but they're not relevant anymore due to changes in OSC behavior. Commit 9777047 fixed this as well (by resetting the mouse state on MOUSE_LEAVE), but all the behavior reverted with this commit as perhaps a bad idea. It wasn't very robust, made it hard to distinguish real events from artificial ones, and finally made the mouse cursor more often visible than needed. (Now switching between workspaces doesn't make the cursor visible again when switching to a fullscreened mpv.)
Diffstat (limited to 'video')
-rw-r--r--video/out/x11_common.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/video/out/x11_common.c b/video/out/x11_common.c
index 9029de6a03..2e51eea47a 100644
--- a/video/out/x11_common.c
+++ b/video/out/x11_common.c
@@ -779,9 +779,6 @@ int vo_x11_check_events(struct vo *vo)
case MotionNotify:
vo_mouse_movement(vo, Event.xmotion.x, Event.xmotion.y);
break;
- case EnterNotify:
- vo_mouse_movement(vo, Event.xcrossing.x, Event.xcrossing.y);
- break;
case LeaveNotify:
mp_input_put_key(vo->input_ctx, MP_KEY_MOUSE_LEAVE);
break;
@@ -1121,8 +1118,7 @@ static void vo_x11_map_window(struct vo *vo, int x, int y, int w, int h)
StructureNotifyMask | ExposureMask |
KeyPressMask | KeyReleaseMask |
ButtonPressMask | ButtonReleaseMask |
- PointerMotionMask | EnterWindowMask |
- LeaveWindowMask);
+ PointerMotionMask | LeaveWindowMask);
XMapWindow(x11->display, x11->window);
vo_x11_clearwindow(vo, x11->window);
}