diff options
author | Moonchild <moonchild@palemoon.org> | 2020-09-23 23:45:46 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2020-09-23 23:45:46 +0000 |
commit | 9f5c27ba479c54d4ebb1bd59b61fbf793f6df93f (patch) | |
tree | 831e0ae1649d6135429def03688bc93ff7c86b03 /widget | |
parent | 42f895f27f239e973c9c06241f7a58da7381353c (diff) | |
parent | f624bd1375655dea196cdcb70a9860bc5817df49 (diff) | |
download | UXP-f265788b02973b1ff9c27d63855076dc6185e0a7.tar UXP-f265788b02973b1ff9c27d63855076dc6185e0a7.tar.gz UXP-f265788b02973b1ff9c27d63855076dc6185e0a7.tar.lz UXP-f265788b02973b1ff9c27d63855076dc6185e0a7.tar.xz UXP-f265788b02973b1ff9c27d63855076dc6185e0a7.zip |
Merge branch 'redwood' into releaseRELBASE_20200929RC_20200924
Diffstat (limited to 'widget')
-rw-r--r-- | widget/cocoa/nsDragService.mm | 4 | ||||
-rw-r--r-- | widget/windows/AudioSession.cpp | 4 | ||||
-rw-r--r-- | widget/windows/CompositorWidgetParent.cpp | 1 | ||||
-rw-r--r-- | widget/windows/IMMHandler.cpp | 2 | ||||
-rw-r--r-- | widget/windows/InkCollector.cpp | 2 | ||||
-rw-r--r-- | widget/windows/KeyboardLayout.cpp | 5 | ||||
-rw-r--r-- | widget/windows/TaskbarPreview.cpp | 14 | ||||
-rw-r--r-- | widget/windows/WinIMEHandler.cpp | 4 | ||||
-rw-r--r-- | widget/windows/WinUtils.cpp | 59 | ||||
-rw-r--r-- | widget/windows/WinUtils.h | 39 | ||||
-rw-r--r-- | widget/windows/nsAppShell.cpp | 64 | ||||
-rw-r--r-- | widget/windows/nsFilePicker.cpp | 2 | ||||
-rw-r--r-- | widget/windows/nsUXThemeData.cpp | 12 | ||||
-rw-r--r-- | widget/windows/nsWindow.cpp | 10 |
14 files changed, 32 insertions, 190 deletions
diff --git a/widget/cocoa/nsDragService.mm b/widget/cocoa/nsDragService.mm index b92db1b2a..c4d8e6ff0 100644 --- a/widget/cocoa/nsDragService.mm +++ b/widget/cocoa/nsDragService.mm @@ -222,7 +222,7 @@ nsDragService::ConstructDragImage(nsIDOMNode* aDOMNode, bool nsDragService::IsValidType(NSString* availableType, bool allowFileURL) { - NS_OBJC_BEGIN_TRY_ABORT_BLOCK; + NS_OBJC_BEGIN_TRY_ABORT_BLOCK_RETURN; // Prevent exposing fileURL for non-fileURL type. // We need URL provided by dropped webloc file, but don't need file's URL. @@ -234,7 +234,7 @@ nsDragService::IsValidType(NSString* availableType, bool allowFileURL) return true; - NS_OBJC_END_TRY_ABORT_BLOCK(false); + NS_OBJC_END_TRY_ABORT_BLOCK_RETURN(false); } NSString* diff --git a/widget/windows/AudioSession.cpp b/widget/windows/AudioSession.cpp index 11e5ba50c..1a83e2964 100644 --- a/widget/windows/AudioSession.cpp +++ b/widget/windows/AudioSession.cpp @@ -13,7 +13,7 @@ #include "nsIUUIDGenerator.h" #include "nsIXULAppInfo.h" -//#include "AudioSession.h" +#include "AudioSession.h" #include "nsCOMPtr.h" #include "nsServiceManagerUtils.h" #include "nsString.h" @@ -27,7 +27,7 @@ namespace mozilla { namespace widget { /* - * To take advantage of what Vista+ have to offer with respect to audio, + * To take advantage of what Windows has to offer with respect to audio, * we need to maintain an audio session. This class wraps IAudioSessionControl * and implements IAudioSessionEvents (for callbacks from Windows) */ diff --git a/widget/windows/CompositorWidgetParent.cpp b/widget/windows/CompositorWidgetParent.cpp index c784ff72e..238141f56 100644 --- a/widget/windows/CompositorWidgetParent.cpp +++ b/widget/windows/CompositorWidgetParent.cpp @@ -4,6 +4,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "CompositorWidgetParent.h" +#include "VsyncDispatcher.h" #include "mozilla/Unused.h" diff --git a/widget/windows/IMMHandler.cpp b/widget/windows/IMMHandler.cpp index 9bd7d2e7a..e16517a38 100644 --- a/widget/windows/IMMHandler.cpp +++ b/widget/windows/IMMHandler.cpp @@ -17,6 +17,8 @@ #include "mozilla/MiscEvents.h" #include "mozilla/TextEvents.h" +using namespace mozilla; + #ifndef IME_PROP_ACCEPT_WIDE_VKEY #define IME_PROP_ACCEPT_WIDE_VKEY 0x20 #endif diff --git a/widget/windows/InkCollector.cpp b/widget/windows/InkCollector.cpp index 5383dda7c..3268fe95b 100644 --- a/widget/windows/InkCollector.cpp +++ b/widget/windows/InkCollector.cpp @@ -7,6 +7,8 @@ #include "InkCollector.h" +using namespace mozilla; + // Msinkaut_i.c and Msinkaut.h should both be included // https://msdn.microsoft.com/en-us/library/windows/desktop/ms695519.aspx #include <msinkaut_i.c> diff --git a/widget/windows/KeyboardLayout.cpp b/widget/windows/KeyboardLayout.cpp index 9166d97d7..b4801fa19 100644 --- a/widget/windows/KeyboardLayout.cpp +++ b/widget/windows/KeyboardLayout.cpp @@ -39,11 +39,6 @@ #include <winable.h> #endif -// In WinUser.h, MAPVK_VK_TO_VSC_EX is defined only when WINVER >= 0x0600 -#ifndef MAPVK_VK_TO_VSC_EX -#define MAPVK_VK_TO_VSC_EX (4) -#endif - namespace mozilla { namespace widget { diff --git a/widget/windows/TaskbarPreview.cpp b/widget/windows/TaskbarPreview.cpp index 6c15df2e0..b07b8039f 100644 --- a/widget/windows/TaskbarPreview.cpp +++ b/widget/windows/TaskbarPreview.cpp @@ -139,7 +139,7 @@ TaskbarPreview::Invalidate() { return NS_OK; HWND previewWindow = PreviewWindow(); - return FAILED(WinUtils::dwmInvalidateIconicBitmapsPtr(previewWindow)) + return FAILED(DwmInvalidateIconicBitmaps(previewWindow)) ? NS_ERROR_FAILURE : NS_OK; } @@ -284,13 +284,13 @@ TaskbarPreview::GetWindowHook() { void TaskbarPreview::EnableCustomDrawing(HWND aHWND, bool aEnable) { BOOL enabled = aEnable; - WinUtils::dwmSetWindowAttributePtr( + DwmSetWindowAttribute( aHWND, DWMWA_FORCE_ICONIC_REPRESENTATION, &enabled, sizeof(enabled)); - WinUtils::dwmSetWindowAttributePtr( + DwmSetWindowAttribute( aHWND, DWMWA_HAS_ICONIC_BITMAP, &enabled, @@ -385,11 +385,11 @@ TaskbarPreviewCallback::Done(nsISupports *aCanvas, bool aDrawBorder) { POINT pptClient = { 0, 0 }; HRESULT hr; if (!mIsThumbnail) { - hr = WinUtils::dwmSetIconicLivePreviewBitmapPtr(mPreview->PreviewWindow(), - hBitmap, &pptClient, flags); + hr = DwmSetIconicLivePreviewBitmap(mPreview->PreviewWindow(), + hBitmap, &pptClient, flags); } else { - hr = WinUtils::dwmSetIconicThumbnailPtr(mPreview->PreviewWindow(), - hBitmap, flags); + hr = DwmSetIconicThumbnail(mPreview->PreviewWindow(), + hBitmap, flags); } MOZ_ASSERT(SUCCEEDED(hr)); return NS_OK; diff --git a/widget/windows/WinIMEHandler.cpp b/widget/windows/WinIMEHandler.cpp index 9debaa2dd..f411cdd50 100644 --- a/widget/windows/WinIMEHandler.cpp +++ b/widget/windows/WinIMEHandler.cpp @@ -961,8 +961,8 @@ IMEHandler::ShowOnScreenKeyboard() } else { PWSTR path = nullptr; HRESULT hres = - WinUtils::SHGetKnownFolderPath(FOLDERID_ProgramFilesCommon, 0, - nullptr, &path); + SHGetKnownFolderPath(FOLDERID_ProgramFilesCommon, 0, + nullptr, &path); if (FAILED(hres) || !path) { return; } diff --git a/widget/windows/WinUtils.cpp b/widget/windows/WinUtils.cpp index bd42e78f6..28033193f 100644 --- a/widget/windows/WinUtils.cpp +++ b/widget/windows/WinUtils.cpp @@ -419,26 +419,10 @@ const char FaviconHelper::kShortcutCacheDir[] = "shortcutCache"; // apis available on vista and up. WinUtils::SHCreateItemFromParsingNamePtr WinUtils::sCreateItemFromParsingName = nullptr; -WinUtils::SHGetKnownFolderPathPtr WinUtils::sGetKnownFolderPath = nullptr; - // We just leak these DLL HMODULEs. There's no point in calling FreeLibrary // on them during shutdown anyway. static const wchar_t kShellLibraryName[] = L"shell32.dll"; static HMODULE sShellDll = nullptr; -static const wchar_t kDwmLibraryName[] = L"dwmapi.dll"; -static HMODULE sDwmDll = nullptr; - -WinUtils::DwmExtendFrameIntoClientAreaProc WinUtils::dwmExtendFrameIntoClientAreaPtr = nullptr; -WinUtils::DwmIsCompositionEnabledProc WinUtils::dwmIsCompositionEnabledPtr = nullptr; -WinUtils::DwmSetIconicThumbnailProc WinUtils::dwmSetIconicThumbnailPtr = nullptr; -WinUtils::DwmSetIconicLivePreviewBitmapProc WinUtils::dwmSetIconicLivePreviewBitmapPtr = nullptr; -WinUtils::DwmGetWindowAttributeProc WinUtils::dwmGetWindowAttributePtr = nullptr; -WinUtils::DwmSetWindowAttributeProc WinUtils::dwmSetWindowAttributePtr = nullptr; -WinUtils::DwmInvalidateIconicBitmapsProc WinUtils::dwmInvalidateIconicBitmapsPtr = nullptr; -WinUtils::DwmDefWindowProcProc WinUtils::dwmDwmDefWindowProcPtr = nullptr; -WinUtils::DwmGetCompositionTimingInfoProc WinUtils::dwmGetCompositionTimingInfoPtr = nullptr; -WinUtils::DwmFlushProc WinUtils::dwmFlushProcPtr = nullptr; - // Prefix for path used by NT calls. const wchar_t kNTPrefix[] = L"\\??\\"; const size_t kNTPrefixLen = ArrayLength(kNTPrefix) - 1; @@ -462,23 +446,6 @@ static NtTestAlertPtr sNtTestAlert = nullptr; void WinUtils::Initialize() { - if (!sDwmDll) { - sDwmDll = ::LoadLibraryW(kDwmLibraryName); - - if (sDwmDll) { - dwmExtendFrameIntoClientAreaPtr = (DwmExtendFrameIntoClientAreaProc)::GetProcAddress(sDwmDll, "DwmExtendFrameIntoClientArea"); - dwmIsCompositionEnabledPtr = (DwmIsCompositionEnabledProc)::GetProcAddress(sDwmDll, "DwmIsCompositionEnabled"); - dwmSetIconicThumbnailPtr = (DwmSetIconicThumbnailProc)::GetProcAddress(sDwmDll, "DwmSetIconicThumbnail"); - dwmSetIconicLivePreviewBitmapPtr = (DwmSetIconicLivePreviewBitmapProc)::GetProcAddress(sDwmDll, "DwmSetIconicLivePreviewBitmap"); - dwmGetWindowAttributePtr = (DwmGetWindowAttributeProc)::GetProcAddress(sDwmDll, "DwmGetWindowAttribute"); - dwmSetWindowAttributePtr = (DwmSetWindowAttributeProc)::GetProcAddress(sDwmDll, "DwmSetWindowAttribute"); - dwmInvalidateIconicBitmapsPtr = (DwmInvalidateIconicBitmapsProc)::GetProcAddress(sDwmDll, "DwmInvalidateIconicBitmaps"); - dwmDwmDefWindowProcPtr = (DwmDefWindowProcProc)::GetProcAddress(sDwmDll, "DwmDefWindowProc"); - dwmGetCompositionTimingInfoPtr = (DwmGetCompositionTimingInfoProc)::GetProcAddress(sDwmDll, "DwmGetCompositionTimingInfo"); - dwmFlushProcPtr = (DwmFlushProc)::GetProcAddress(sDwmDll, "DwmFlush"); - } - } - if (IsWin10OrLater()) { HMODULE user32Dll = ::GetModuleHandleW(L"user32"); if (user32Dll) { @@ -1179,32 +1146,6 @@ WinUtils::SHCreateItemFromParsingName(PCWSTR pszPath, IBindCtx *pbc, return sCreateItemFromParsingName(pszPath, pbc, riid, ppv); } -/* static */ -HRESULT -WinUtils::SHGetKnownFolderPath(REFKNOWNFOLDERID rfid, - DWORD dwFlags, - HANDLE hToken, - PWSTR *ppszPath) -{ - if (sGetKnownFolderPath) { - return sGetKnownFolderPath(rfid, dwFlags, hToken, ppszPath); - } - - if (!sShellDll) { - sShellDll = ::LoadLibraryW(kShellLibraryName); - if (!sShellDll) { - return false; - } - } - - sGetKnownFolderPath = (SHGetKnownFolderPathPtr) - GetProcAddress(sShellDll, "SHGetKnownFolderPath"); - if (!sGetKnownFolderPath) - return E_FAIL; - - return sGetKnownFolderPath(rfid, dwFlags, hToken, ppszPath); -} - static BOOL WINAPI EnumFirstChild(HWND hwnd, LPARAM lParam) { diff --git a/widget/windows/WinUtils.h b/widget/windows/WinUtils.h index 37469ce07..1281171be 100644 --- a/widget/windows/WinUtils.h +++ b/widget/windows/WinUtils.h @@ -399,14 +399,6 @@ public: REFIID riid, void **ppv); /** - * SHGetKnownFolderPath() calls native SHGetKnownFolderPath() - * API which is available on Vista and up. - */ - static HRESULT SHGetKnownFolderPath(REFKNOWNFOLDERID rfid, - DWORD dwFlags, - HANDLE hToken, - PWSTR *ppszPath); - /** * GetShellItemPath return the file or directory path of a shell item. * Internally calls IShellItem's GetDisplayName. * @@ -478,31 +470,6 @@ public: */ static bool ResolveJunctionPointsAndSymLinks(std::wstring& aPath); - /** - * dwmapi.dll function typedefs and declarations - */ - typedef HRESULT (WINAPI*DwmExtendFrameIntoClientAreaProc)(HWND hWnd, const MARGINS *pMarInset); - typedef HRESULT (WINAPI*DwmIsCompositionEnabledProc)(BOOL *pfEnabled); - typedef HRESULT (WINAPI*DwmSetIconicThumbnailProc)(HWND hWnd, HBITMAP hBitmap, DWORD dwSITFlags); - typedef HRESULT (WINAPI*DwmSetIconicLivePreviewBitmapProc)(HWND hWnd, HBITMAP hBitmap, POINT *pptClient, DWORD dwSITFlags); - typedef HRESULT (WINAPI*DwmGetWindowAttributeProc)(HWND hWnd, DWORD dwAttribute, LPCVOID pvAttribute, DWORD cbAttribute); - typedef HRESULT (WINAPI*DwmSetWindowAttributeProc)(HWND hWnd, DWORD dwAttribute, LPCVOID pvAttribute, DWORD cbAttribute); - typedef HRESULT (WINAPI*DwmInvalidateIconicBitmapsProc)(HWND hWnd); - typedef HRESULT (WINAPI*DwmDefWindowProcProc)(HWND hWnd, UINT msg, LPARAM lParam, WPARAM wParam, LRESULT *aRetValue); - typedef HRESULT (WINAPI*DwmGetCompositionTimingInfoProc)(HWND hWnd, DWM_TIMING_INFO *info); - typedef HRESULT (WINAPI*DwmFlushProc)(void); - - static DwmExtendFrameIntoClientAreaProc dwmExtendFrameIntoClientAreaPtr; - static DwmIsCompositionEnabledProc dwmIsCompositionEnabledPtr; - static DwmSetIconicThumbnailProc dwmSetIconicThumbnailPtr; - static DwmSetIconicLivePreviewBitmapProc dwmSetIconicLivePreviewBitmapPtr; - static DwmGetWindowAttributeProc dwmGetWindowAttributePtr; - static DwmSetWindowAttributeProc dwmSetWindowAttributePtr; - static DwmInvalidateIconicBitmapsProc dwmInvalidateIconicBitmapsPtr; - static DwmDefWindowProcProc dwmDwmDefWindowProcPtr; - static DwmGetCompositionTimingInfoProc dwmGetCompositionTimingInfoPtr; - static DwmFlushProc dwmFlushProcPtr; - static void Initialize(); static bool ShouldHideScrollbars(); @@ -529,12 +496,6 @@ private: REFIID riid, void **ppv); static SHCreateItemFromParsingNamePtr sCreateItemFromParsingName; - typedef HRESULT (WINAPI * SHGetKnownFolderPathPtr)(REFKNOWNFOLDERID rfid, - DWORD dwFlags, - HANDLE hToken, - PWSTR *ppszPath); - static SHGetKnownFolderPathPtr sGetKnownFolderPath; - static void GetWhitelistedPaths( nsTArray<mozilla::Pair<nsString,nsDependentString>>& aOutput); }; diff --git a/widget/windows/nsAppShell.cpp b/widget/windows/nsAppShell.cpp index c3e99b2d3..e63d57d89 100644 --- a/widget/windows/nsAppShell.cpp +++ b/widget/windows/nsAppShell.cpp @@ -53,9 +53,9 @@ public: NS_IMETHOD Notify(nsITimer *timer) override { WAKE_LOCK_LOG("WinWakeLock: periodic timer fired"); - ResetScreenSaverTimeout(); return NS_OK; } + private: ~WinWakeLockListener() {} @@ -67,75 +67,15 @@ private: // "locked-foreground" notifications when multipe wake locks are held. if (aState.EqualsASCII("locked-foreground")) { WAKE_LOCK_LOG("WinWakeLock: Blocking screen saver"); - // We block the screen saver by periodically resetting the screen - // saver timeout. - StartTimer(); - // Prevent the display turning off. On Win7 and later this also - // blocks the screen saver, but we need the timer started above - // to block on Win XP and Vista. + // Prevent the display turning off. SetThreadExecutionState(ES_DISPLAY_REQUIRED|ES_CONTINUOUS); } else { WAKE_LOCK_LOG("WinWakeLock: Unblocking screen saver"); - // Re-enable screen saver. - StopTimer(); // Unblock display turning off. SetThreadExecutionState(ES_CONTINUOUS); } return NS_OK; } - - void StartTimer() { - ResetScreenSaverTimeout(); - MOZ_ASSERT(!mTimer); - if (mTimer) { - return; - } - - nsresult rv; - nsCOMPtr<nsITimer> timer = do_CreateInstance(NS_TIMER_CONTRACTID, &rv); - if (NS_FAILED(rv)) { - NS_WARNING("Failed to create screen saver timeout reset timer"); - return; - } - // The minimum screensaver timeout that can be specified with Windows' UI - // is 60 seconds. We set a timer to re-jig the screen saver 10 seconds - // before we expect the timer to run out, but always at least in 1 second - // intervals. We reset the timer at a max of 50 seconds, so that if the - // user changes the timeout using the UI, we won't be caught out. - int32_t timeout = std::max(std::min(50, (int32_t)mScreenSaverTimeout - 10), 1); - uint32_t timeoutMs = (uint32_t)timeout * 1000; - WAKE_LOCK_LOG("WinWakeLock: Setting periodic timer for %d ms", timeoutMs); - rv = timer->InitWithCallback(this, - timeoutMs, - nsITimer::TYPE_REPEATING_SLACK); - if (NS_FAILED(rv)) { - NS_WARNING("Failed to initialize screen saver timeout reset timer"); - return; - } - - mTimer = timer.forget(); - } - - void StopTimer() { - WAKE_LOCK_LOG("WinWakeLock: StopTimer()"); - if (!mTimer) { - return; - } - mTimer->Cancel(); - mTimer = nullptr; - } - - // Resets the operating system's timeout for when to disable the screen. - // Called periodically to keep the screensaver off. - void ResetScreenSaverTimeout() { - if (SystemParametersInfo(SPI_GETSCREENSAVETIMEOUT, 0, &mScreenSaverTimeout, 0)) { - SystemParametersInfo(SPI_SETSCREENSAVETIMEOUT, mScreenSaverTimeout, NULL, 0); - } - WAKE_LOCK_LOG("WinWakeLock: ResetScreenSaverTimeout() mScreenSaverTimeout=%d", mScreenSaverTimeout); - } - - UINT mScreenSaverTimeout = 60; - nsCOMPtr<nsITimer> mTimer; }; NS_IMPL_ISUPPORTS(WinWakeLockListener, nsIDOMMozWakeLockListener, nsITimerCallback) diff --git a/widget/windows/nsFilePicker.cpp b/widget/windows/nsFilePicker.cpp index 4e942968a..53824b93f 100644 --- a/widget/windows/nsFilePicker.cpp +++ b/widget/windows/nsFilePicker.cpp @@ -220,7 +220,7 @@ STDMETHODIMP nsFilePicker::QueryInterface(REFIID refiid, void** ppvResult) /* - * Vista+ callbacks + * Callbacks */ HRESULT diff --git a/widget/windows/nsUXThemeData.cpp b/widget/windows/nsUXThemeData.cpp index 4d9ac9570..ce2777585 100644 --- a/widget/windows/nsUXThemeData.cpp +++ b/widget/windows/nsUXThemeData.cpp @@ -156,10 +156,10 @@ nsUXThemeData::UpdateTitlebarInfo(HWND aWnd) if (!sTitlebarInfoPopulatedAero && nsUXThemeData::CheckForCompositor()) { RECT captionButtons; - if (SUCCEEDED(WinUtils::dwmGetWindowAttributePtr(aWnd, - DWMWA_CAPTION_BUTTON_BOUNDS, - &captionButtons, - sizeof(captionButtons)))) { + if (SUCCEEDED(DwmGetWindowAttribute(aWnd, + DWMWA_CAPTION_BUTTON_BOUNDS, + &captionButtons, + sizeof(captionButtons)))) { sCommandButtons[CMDBUTTONIDX_BUTTONBOX].cx = captionButtons.right - captionButtons.left - 3; sCommandButtons[CMDBUTTONIDX_BUTTONBOX].cy = (captionButtons.bottom - captionButtons.top) - 1; sTitlebarInfoPopulatedAero = true; @@ -293,8 +293,8 @@ bool nsUXThemeData::IsHighContrastOn() bool nsUXThemeData::CheckForCompositor(bool aUpdateCache) { static BOOL sCachedValue = FALSE; - if (aUpdateCache && WinUtils::dwmIsCompositionEnabledPtr) { - WinUtils::dwmIsCompositionEnabledPtr(&sCachedValue); + if (aUpdateCache) { + DwmIsCompositionEnabled(&sCachedValue); } return sCachedValue; } diff --git a/widget/windows/nsWindow.cpp b/widget/windows/nsWindow.cpp index 122d18686..907d8b9a5 100644 --- a/widget/windows/nsWindow.cpp +++ b/widget/windows/nsWindow.cpp @@ -846,9 +846,9 @@ nsWindow::Create(nsIWidget* aParent, return NS_ERROR_FAILURE; } - if (mIsRTL && WinUtils::dwmSetWindowAttributePtr) { + if (mIsRTL) { DWORD dwAttribute = TRUE; - WinUtils::dwmSetWindowAttributePtr(mWnd, DWMWA_NONCLIENT_RTL_LAYOUT, &dwAttribute, sizeof dwAttribute); + DwmSetWindowAttribute(mWnd, DWMWA_NONCLIENT_RTL_LAYOUT, &dwAttribute, sizeof dwAttribute); } if (!IsPlugin() && @@ -3113,8 +3113,8 @@ void nsWindow::UpdateGlass() // Extends the window frame behind the client area if (nsUXThemeData::CheckForCompositor()) { - WinUtils::dwmExtendFrameIntoClientAreaPtr(mWnd, &margins); - WinUtils::dwmSetWindowAttributePtr(mWnd, DWMWA_NCRENDERING_POLICY, &policy, sizeof policy); + DwmExtendFrameIntoClientArea(mWnd, &margins); + DwmSetWindowAttribute(mWnd, DWMWA_NCRENDERING_POLICY, &policy, sizeof policy); } } #endif @@ -4961,7 +4961,7 @@ nsWindow::ProcessMessage(UINT msg, WPARAM& wParam, LPARAM& lParam, /* We don't do this for win10 glass with a custom titlebar, * in order to avoid the caption buttons breaking. */ !(IsWin10OrLater() && HasGlass()) && - WinUtils::dwmDwmDefWindowProcPtr(mWnd, msg, wParam, lParam, &dwmHitResult)) { + DwmDefWindowProc(mWnd, msg, wParam, lParam, &dwmHitResult)) { *aRetValue = dwmHitResult; return true; } |