зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1633713 - Set WS_EX_COMPOSITED to PiP window on Windows7 r=jrmuizel
When window is PiP window on Windows7, WS_EX_COMPOSITED is set to suppress flickering during resizing with hardware acceleration as a workaround. PiP window detection in nsAppShellService::JustCreateTopWindow() mimics Linux/Gtk implementation. Differential Revision: https://phabricator.services.mozilla.com/D77663
This commit is contained in:
Родитель
1af3749d41
Коммит
1dcc9fa029
|
@ -838,6 +838,15 @@ nsresult nsWindow::Create(nsIWidget* aParent, nsNativeWidget aNativeParent,
|
|||
DWORD style = WindowStyle();
|
||||
DWORD extendedStyle = WindowExStyle();
|
||||
|
||||
// When window is PiP window on Windows7, WS_EX_COMPOSITED is set to suppress
|
||||
// flickering during resizing with hardware acceleration.
|
||||
bool isPIPWindow = aInitData && aInitData->mPIPWindow;
|
||||
if (isPIPWindow && !IsWin8OrLater() &&
|
||||
gfxConfig::IsEnabled(gfx::Feature::HW_COMPOSITING) &&
|
||||
WidgetTypeSupportsAcceleration()) {
|
||||
extendedStyle |= WS_EX_COMPOSITED;
|
||||
}
|
||||
|
||||
if (mWindowType == eWindowType_popup) {
|
||||
if (!aParent) {
|
||||
parent = nullptr;
|
||||
|
|
|
@ -608,6 +608,19 @@ nsresult nsAppShellService::JustCreateTopWindow(
|
|||
((aChromeMask & pipMask) == pipMask) && !(aChromeMask & barMask)) {
|
||||
widgetInitData.mPIPWindow = true;
|
||||
}
|
||||
#elif defined(XP_WIN)
|
||||
// Windows PIP window support. It's Chrome dialog window, always on top
|
||||
// and without any bar.
|
||||
uint32_t pipMask = nsIWebBrowserChrome::CHROME_ALWAYS_ON_TOP |
|
||||
nsIWebBrowserChrome::CHROME_OPENAS_CHROME;
|
||||
uint32_t barMask = nsIWebBrowserChrome::CHROME_MENUBAR |
|
||||
nsIWebBrowserChrome::CHROME_TOOLBAR |
|
||||
nsIWebBrowserChrome::CHROME_LOCATIONBAR |
|
||||
nsIWebBrowserChrome::CHROME_STATUSBAR;
|
||||
if (widgetInitData.mWindowType == eWindowType_dialog &&
|
||||
((aChromeMask & pipMask) == pipMask) && !(aChromeMask & barMask)) {
|
||||
widgetInitData.mPIPWindow = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
|
|
Загрузка…
Ссылка в новой задаче