From 4b8c47d20bc2cb5196a693d72483d6c6481c62b3 Mon Sep 17 00:00:00 2001
From: nanahi <130121847+na-na-hi@users.noreply.github.com>
Date: Tue, 27 Feb 2024 09:40:36 -0500
Subject: [PATCH] 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.
---
 video/out/w32_common.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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();