Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions DOCS/man/options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6322,12 +6322,13 @@ them.

``--wayland-edge-pixels-pointer=<value>``
Defines the size of an edge border (default: 16) to initiate client side
resize events in the wayland contexts with the mouse. This is only active if
there are no server side decorations from the compositor.
resize events in the wayland contexts with the mouse or tablet. This is only
active if there are no server side decorations from the compositor.

``--wayland-edge-pixels-touch=<value>``
Defines the size of an edge border (default: 32) to initiate client side
resizes events in the wayland contexts with touch events.
resizes events in the wayland contexts with touch events. This is only
active if there are no server side decorations from the compositor.

``--wayland-internal-vsync=<no|auto|yes>``
Controls whether to use mpv's internal vsync for Wayland-base video outputs
Expand Down
3 changes: 2 additions & 1 deletion video/out/wayland_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ static void tablet_tool_handle_down(void *data,
enum xdg_toplevel_resize_edge edge;
if (!mp_input_test_dragging(wl->vo->input_ctx, wl->mouse_x, wl->mouse_y) &&
!wl->locked_size && !wl->opts->border &&
check_for_resize(wl, wl->opts->wl_edge_pixels_touch, &edge))
check_for_resize(wl, wl->opts->wl_edge_pixels_pointer, &edge))
{
xdg_toplevel_resize(wl->xdg_toplevel, tablet_tool->seat->seat, serial, edge);
return;
Expand Down Expand Up @@ -2994,6 +2994,7 @@ static int check_for_resize(struct vo_wayland_state *wl, int edge_pixels,
int pos[2] = { wl->mouse_x, wl->mouse_y };
*edges = 0;

edge_pixels = handle_round(wl->scaling, edge_pixels);
if (pos[0] < edge_pixels)
*edges |= XDG_TOPLEVEL_RESIZE_EDGE_LEFT;
if (pos[0] > (mp_rect_w(wl->geometry) - edge_pixels))
Expand Down
Loading