[vlc-devel] [PATCH 07/41] vout:win32: move the window position retrieval

Steve Lhomme robux4 at ycbcr.xyz
Fri Mar 22 16:13:45 CET 2019


Closer to where it's used
---
 modules/video_output/win32/common.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/modules/video_output/win32/common.c b/modules/video_output/win32/common.c
index a2a5b2e9fc..c14ce7ba73 100644
--- a/modules/video_output/win32/common.c
+++ b/modules/video_output/win32/common.c
@@ -163,11 +163,6 @@ static void UpdateRectsInternal(vout_display_t *vd, bool is_forced)
     {
         if (!sys->pf_GetRect(sys, &rect))
             return;
-
-#if !VLC_WINSTORE_APP
-        /* Retrieve the window position */
-        ClientToScreen(sys->hwnd, &point);
-#endif
     }
 
     /* If nothing changed, we can return */
@@ -182,9 +177,14 @@ static void UpdateRectsInternal(vout_display_t *vd, bool is_forced)
         moved_or_resized = false;
     }
     else
-    EventThreadUpdateWindowPosition(sys->event, &moved_or_resized,
-        point.x, point.y,
-        rect.right, rect.bottom);
+    {
+        /* Retrieve the window position */
+        ClientToScreen(sys->hwnd, &point);
+
+        EventThreadUpdateWindowPosition(sys->event, &moved_or_resized,
+                                        point.x, point.y,
+                                        rect.right, rect.bottom);
+    }
 #endif
     if (!is_forced && !moved_or_resized)
         return;
-- 
2.17.1



More information about the vlc-devel mailing list