mirror of
https://github.com/mpv-player/mpv
synced 2025-03-07 14:47:53 +00:00
input: add MP_TOUCH_RELEASE_ALL
Release all touch points. Used by some VOs like Wayland touch cancel event.
This commit is contained in:
parent
77809faea1
commit
89aa10de24
@ -735,6 +735,11 @@ static void feed_key(struct input_ctx *ictx, int code, double scale,
|
||||
release_down_cmd(ictx, false);
|
||||
return;
|
||||
}
|
||||
if (code == MP_TOUCH_RELEASE_ALL) {
|
||||
MP_TRACE(ictx, "release all touch\n");
|
||||
ictx->num_touch_points = 0;
|
||||
return;
|
||||
}
|
||||
if (!opts->enable_mouse_movements && MP_KEY_IS_MOUSE(unmod) && !force_mouse)
|
||||
return;
|
||||
if (unmod == MP_KEY_MOUSE_LEAVE || unmod == MP_KEY_MOUSE_ENTER) {
|
||||
|
@ -216,6 +216,8 @@
|
||||
#define MP_KEY_ANY_UNICODE (MP_KEY_INTERN+5)
|
||||
// For mp_input_put_key(): release all keys that are down.
|
||||
#define MP_INPUT_RELEASE_ALL (MP_KEY_INTERN+6)
|
||||
// For mp_input_put_key(): release all touch points.
|
||||
#define MP_TOUCH_RELEASE_ALL (MP_KEY_INTERN+7)
|
||||
|
||||
// Emit a command even on key-up (normally key-up is ignored). This means by
|
||||
// default they binding will be triggered on key-up instead of key-down.
|
||||
|
Loading…
Reference in New Issue
Block a user