[vlc-commits] win32: don't hide controls while mouse is within

Daniel Amm git at videolan.org
Wed Dec 16 17:46:29 CET 2015


npapi-vlc | branch: master | Daniel Amm <da2424 at t-online.de> | Tue Dec 15 22:15:36 2015 +0100| [5c483d51250d31399920fccf82330eef2c0634e2] | committer: Jean-Baptiste Kempf

win32: don't hide controls while mouse is within

This was a regression since 66aef01260fe87de5f04818dd9e1d556a87a6a93

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> https://code.videolan.org/videolan/npapi-vlc/commit/5c483d51250d31399920fccf82330eef2c0634e2
---

 common/win32_fullscreen.cpp | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/common/win32_fullscreen.cpp b/common/win32_fullscreen.cpp
index 11d83c4..5c20dca 100644
--- a/common/win32_fullscreen.cpp
+++ b/common/win32_fullscreen.cpp
@@ -231,7 +231,17 @@ LRESULT VLCControlsWnd::WindowProc(UINT uMsg, WPARAM wParam, LPARAM lParam)
             break;
         }
         case WM_TIMER:{
-            NeedHideControls();
+            POINT MousePoint;
+            GetCursorPos(&MousePoint);
+            RECT ControlWndRect;
+            GetWindowRect(hWnd(), &ControlWndRect);
+            if(PtInRect(&ControlWndRect, MousePoint)||GetCapture()==hVolumeSlider){
+                //do not allow control window to close while mouse is within
+                NeedShowControls();
+            }
+            else{
+                NeedHideControls();
+            }
             break;
         }
         case WM_SETCURSOR:{



More information about the vlc-commits mailing list