Jean-Baptiste Kempf pushed to branch master at videolan / VLC Browser Plugins
Commits: aa98041e by Pierre Lamot at 2017-11-20T11:11:17+01:00 win32: fix Controls/toolbar never appears over embed element (ref #18831) Signed-off-by: Jean-Baptiste Kempf <[email protected]> - - - - - 1 changed file: - common/win32_fullscreen.cpp Changes: ===================================== common/win32_fullscreen.cpp ===================================== --- a/common/win32_fullscreen.cpp +++ b/common/win32_fullscreen.cpp @@ -443,9 +443,10 @@ void VLCControlsWnd::RegisterToVLCEvents() void VLCControlsWnd::NeedShowControls() { - if( !(GetWindowLong(hWnd(), GWL_STYLE) & WS_VISIBLE) ) { - if(WM().IsFullScreen() || (PO() && PO()->get_show_toolbar() ) ) - ShowWindow( hWnd(), SW_SHOW ); + if ( WM().IsFullScreen() || (PO() && PO()->get_show_toolbar()) ) + { + SetWindowPos( hWnd(), HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE ); + ShowWindow( hWnd(), SW_SHOW ); } SetTimer(hWnd(), 1, 2 * 1000, nullptr); } @@ -898,6 +899,19 @@ void VLCWindowsManager::StartFullScreen() FSFlags); ShowWindow(_FSWnd->getHWND(), SW_SHOW); + + HWND controlWindow = _HolderWnd->ControlWindow()->hWnd(); + //parenting to NULL promotes window to WS_POPUP + SetParent(controlWindow, NULL); + //Ensure control window is on the right screen + RECT controlRect; + GetWindowRect(controlWindow, &controlRect); + OffsetRect(&controlRect, FSRect.left - controlRect.left, FSRect.bottom - controlRect.bottom); + SetWindowPos(controlWindow, HWND_TOPMOST, + controlRect.left, controlRect.top, + controlRect.right - controlRect.left, controlRect.bottom - controlRect.top, + SWP_FRAMECHANGED); + } } @@ -918,6 +932,10 @@ void VLCWindowsManager::EndFullScreen() _FSWnd->DestroyWindow(); _FSWnd = nullptr; + + HWND controlWindow = _HolderWnd->ControlWindow()->hWnd(); + SetParent(controlWindow, _HolderWnd->hWnd()); + SetWindowPos(controlWindow, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_FRAMECHANGED); } } View it on GitLab: https://code.videolan.org/videolan/npapi-vlc/commit/aa98041e46e34ba4698bdf50a3fbf240246729b4 --- View it on GitLab: https://code.videolan.org/videolan/npapi-vlc/commit/aa98041e46e34ba4698bdf50a3fbf240246729b4 You're receiving this email because of your account on code.videolan.org.
_______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
