summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornanahi <130121847+na-na-hi@users.noreply.github.com>2024-02-27 09:40:36 -0500
committersfan5 <sfan5@live.de>2024-03-01 18:25:12 +0100
commit4b8c47d20bc2cb5196a693d72483d6c6481c62b3 (patch)
treef0cefce17881c37ba3c1401a8bc39ea192814f5f
parent092f556898ae456ccfe41d77a7bf5b216bc4c0ab (diff)
downloadmpv-4b8c47d20bc2cb5196a693d72483d6c6481c62b3.tar.bz2
mpv-4b8c47d20bc2cb5196a693d72483d6c6481c62b3.tar.xz
w32_common: re-add fullscreen check when start dragging
57367377505b6b2edc87004fa3192d831d515aa5 removed the check because it was not needed to prevent fullscreen window from being dragged. However, this causes an undesirable behavior: when using a touch screen to drag a window on Windows 11, DWM shrinks the window content a bit with an acrylic backdrop to indicate that the window is being dragged. This also happens when trying to drag the window in fullscreen. Add the check to prevent this from happening.
-rw-r--r--video/out/w32_common.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/video/out/w32_common.c b/video/out/w32_common.c
index e00d35c8c4..24efce1dd3 100644
--- a/video/out/w32_common.c
+++ b/video/out/w32_common.c
@@ -474,7 +474,8 @@ static bool handle_char(struct vo_w32_state *w32, WPARAM wc, bool decode)
static void begin_dragging(struct vo_w32_state *w32)
{
- if (mp_input_test_dragging(w32->input_ctx, w32->mouse_x, w32->mouse_y))
+ if (w32->current_fs ||
+ mp_input_test_dragging(w32->input_ctx, w32->mouse_x, w32->mouse_y))
return;
// Window dragging hack
ReleaseCapture();