[vlc-commits] vout:win32: no need to position the main HWND when the parent changes

Steve Lhomme git at videolan.org
Mon Apr 1 16:50:25 CEST 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Apr  1 14:33:11 2019 +0200| [5323c4c6850f5e9e9c7cc46148e9f455e9d4f2bd] | committer: Steve Lhomme

vout:win32: no need to position the main HWND when the parent changes

We already handle VOUT_DISPLAY_CHANGE_DISPLAY_SIZE for that or get a WM_SIZE.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5323c4c6850f5e9e9c7cc46148e9f455e9d4f2bd
---

 modules/video_output/win32/common.c | 31 -------------------------------
 1 file changed, 31 deletions(-)

diff --git a/modules/video_output/win32/common.c b/modules/video_output/win32/common.c
index 1e8ab342e6..34e59d9de9 100644
--- a/modules/video_output/win32/common.c
+++ b/modules/video_output/win32/common.c
@@ -234,37 +234,6 @@ void CommonManage(vout_display_t *vd, vout_display_sys_win32_t *sys)
     if (sys->b_windowless)
         return;
 
-    /* We used to call the Win32 PeekMessage function here to read the window
-     * messages. But since window can stay blocked into this function for a
-     * long time (for example when you move your window on the screen), I
-     * decided to isolate PeekMessage in another thread. */
-    /* If we do not control our window, we check for geometry changes
-     * ourselves because the parent might not send us its events. */
-    if (sys->hparent) {
-        RECT rect_parent;
-
-        /* Check if the parent window has resized or moved */
-        GetClientRect(sys->hparent, &rect_parent);
-
-        if (RECTWidth(rect_parent)  != RECTWidth(sys->rect_parent) ||
-            RECTHeight(rect_parent) != RECTHeight(sys->rect_parent)) {
-            sys->rect_parent = rect_parent;
-
-            /* This code deals with both resize and move
-             *
-             * For most drivers(direct3d9, gdi, opengl), move is never
-             * an issue. The surface automatically gets moved together
-             * with the associated window (hvideownd)
-             */
-            SetWindowPos(sys->hwnd, 0, 0, 0,
-                         RECTWidth(rect_parent),
-                         RECTHeight(rect_parent),
-                         SWP_NOZORDER);
-
-            UpdateRects(vd, sys);
-        }
-    }
-
     if (EventThreadGetAndResetSizeChanged(sys->event))
         UpdateRects(vd, sys);
 }



More information about the vlc-commits mailing list