Commit c167ac58 authored by bdakin@apple.com's avatar bdakin@apple.com
Browse files

Fix for https://bugs.webkit.org/show_bug.cgi?id=33739 Fullscreen

video HUD stays on top when switching to another window (e.g. via 
Alt-Tab)
-and corresponding-
<rdar://problem/7547574>

Reviewed by Adam Roben.

The HUD was always on top because it had the WS_EX_TOPMOST style. 
So I removed the style and made m_videoWindow the owner of 
m_hudWindow. This keeps m_hudWindow on top only when m_videoWindow 
is the focused window.

* FullscreenVideoController.cpp:
(FullscreenVideoController::exitFullscreen): ASSERT that movie()->exitFullscreen() also destroyed the hud.
(FullscreenVideoController::createHUDWindow):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55942 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 401b2ab7
2010-03-12 Beth Dakin <bdakin@apple.com>
Reviewed by Adam Roben.
Fix for https://bugs.webkit.org/show_bug.cgi?id=33739 Fullscreen
video HUD stays on top when switching to another window (e.g. via
Alt-Tab)
-and corresponding-
<rdar://problem/7547574>
The HUD was always on top because it had the WS_EX_TOPMOST style.
So I removed the style and made m_videoWindow the owner of
m_hudWindow. This keeps m_hudWindow on top only when m_videoWindow
is the focused window.
* FullscreenVideoController.cpp:
(FullscreenVideoController::exitFullscreen): ASSERT that movie()->exitFullscreen() also destroyed the hud.
(FullscreenVideoController::createHUDWindow):
2010-03-12 Enrica Casucci <enrica@apple.com>
Reviewed by Simon Fraser.
......
......@@ -226,12 +226,12 @@ void FullscreenVideoController::enterFullscreen()
void FullscreenVideoController::exitFullscreen()
{
SetWindowLongPtr(m_hudWindow, 0, 0);
if (movie())
movie()->exitFullscreen();
ASSERT(!IsWindow(m_hudWindow));
m_videoWindow = 0;
SetWindowLongPtr(m_hudWindow, 0, 0);
DestroyWindow(m_hudWindow);
m_hudWindow = 0;
}
......@@ -368,9 +368,9 @@ void FullscreenVideoController::createHUDWindow()
registerHUDWindowClass();
m_hudWindow = CreateWindowEx(WS_EX_LAYERED | WS_EX_TRANSPARENT | WS_EX_TOPMOST | WS_EX_TOOLWINDOW,
m_hudWindow = CreateWindowEx(WS_EX_LAYERED | WS_EX_TRANSPARENT | WS_EX_TOOLWINDOW,
fullscreenVideeoHUDWindowClassName, 0, WS_POPUP | WS_VISIBLE,
m_hudPosition.x(), m_hudPosition.y(), 0, 0, 0, 0, gInstance, 0);
m_hudPosition.x(), m_hudPosition.y(), 0, 0, m_videoWindow, 0, gInstance, 0);
ASSERT(::IsWindow(m_hudWindow));
SetWindowLongPtr(m_hudWindow, 0, reinterpret_cast<LONG_PTR>(this));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment