summaryrefslogtreecommitdiffstats
path: root/mpvcore/input/input.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-09-05 23:58:51 +0200
committerwm4 <wm4@nowhere>2013-09-08 01:50:14 +0200
commitac927e39bf48ae1a2a45904f4802bf79e701de03 (patch)
tree7c32bace00b2c3702cce070b85d621cf15a79e03 /mpvcore/input/input.h
parent0a9919fa2eb071de34865f6c8572683397c43da3 (diff)
downloadmpv-ac927e39bf48ae1a2a45904f4802bf79e701de03.tar.bz2
mpv-ac927e39bf48ae1a2a45904f4802bf79e701de03.tar.xz
input: don't deliver mouse events if mouse area is not set
This caused the OSC to be always visible at startup on X11: - EnterNotify event send a mouse event to input.c - OSC has not completely initialized yet, and no mouse area is set - mouse event is dispatched to "showhide" OSC section - OSC becomes visible, regardless of mouse position Fix this by treating the mouse area as empty if it's not set, instead of infinite as it was before this commit. This means an input section must set a mouse area to receive mouse events at all. We also have to change the default section to receive mouse events with the new behavior. Also, if MOUSE_MOVE is unmapped (or mapped to something that doesn't parse), and produces no command, the mouse position wouldn't be updated (because the mouse position is bound to input commands), so we have to generate a dummy command in this case. (This matters only for the OSC, On Screen Controller, which isn't merged yet, so these changes shouldn't have much effect right now.)
Diffstat (limited to 'mpvcore/input/input.h')
-rw-r--r--mpvcore/input/input.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/mpvcore/input/input.h b/mpvcore/input/input.h
index ebdbc76821..ed1f177e58 100644
--- a/mpvcore/input/input.h
+++ b/mpvcore/input/input.h
@@ -118,6 +118,8 @@ enum mp_input_section_flags {
MP_INPUT_EXCLUSIVE = 1,
// Let mp_input_test_dragging() return true, even if inside the mouse area.
MP_INPUT_ALLOW_VO_DRAGGING = 2,
+ // Don't force mouse pointer visible, even if inside the mouse area.
+ MP_INPUT_ALLOW_HIDE_CURSOR = 4,
};
struct input_ctx;