From 8300830951e2b0b90b22fc7d33b7556ed05e139c Mon Sep 17 00:00:00 2001 From: Dudemanguy Date: Sat, 7 Aug 2021 22:05:05 -0500 Subject: wayland: improve behavior with touch events There's currently some touch related code in mpv wayland, but clearly nobody actually uses because it's a broken mess. Initially an attempt to distinguish between two finger touches and one finger touch was made, but there's not a good way to make this work. For whatever reason, initiating either xdg_toplevel_resize or xdg_toplevel_move blocks any other touch events from occurring (at least in plasma). Trying to call these functions anywhere else is not really useful since the serial will be invalid outside of the touch down events (well it would work in the touch up event but that's just silly). Anyways, let's just make this work sanely. Eliminate the touch entries variable completely because it's pointless. Only one finger event is ever considered at a time. Touches besides the initial one are all ignored. If a user touches and drags within the touch edge radius, then a resize event occurs. If the user touches and drags elsewhere on the window, a move event occurs. A single tap displays the osc (which is clickable if you tap again). A double tap toggles fullscreen. Additionally, the default touch edge radius of 64 pixels is way too big (at least I think so). Cut this in half to 32 which feels a lot better (on a pinephone using plasma mobile anyway). --- DOCS/man/options.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'DOCS/man/options.rst') diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index c08161f338..731d155390 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -5506,7 +5506,7 @@ The following video options are currently all specific to ``--vo=gpu`` and there are no server side decorations from the compositor. ``--wayland-edge-pixels-touch=`` - Defines the size of an edge border (default: 64) to initiate client side + Defines the size of an edge border (default: 32) to initiate client side resizes events in the wayland contexts with touch events. ``--spirv-compiler=`` -- cgit v1.2.3