tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 81a7119f574ddb72a078967c1225ffc937ad0a0b
parent 45b7b43ae67db7b9fb4da854cdf4520c4bc42944
Author: Emilio Cobos Álvarez <emilio@crisal.io>
Date:   Fri, 28 Nov 2025 22:21:54 +0000

Bug 2002998 - Stop calling into Dwm in order to hit test window buttons. r=win-reviewers,gstoll

We don't rely on DWM buttons + custom non-client area in any
configuration nowadays (this used to be the case with windows 7).

Differential Revision: https://phabricator.services.mozilla.com/D274417

Diffstat:
Mwidget/windows/nsWindow.cpp | 20++------------------
1 file changed, 2 insertions(+), 18 deletions(-)

diff --git a/widget/windows/nsWindow.cpp b/widget/windows/nsWindow.cpp @@ -4755,17 +4755,6 @@ bool nsWindow::ProcessMessageInternal(UINT msg, WPARAM& wParam, LPARAM& lParam, return true; } - // Glass hit testing w/custom transparent margins. - // - // FIXME(emilio): is this needed? We deal with titlebar buttons non-natively - // now. - LRESULT dwmHitResult; - if (mCustomNonClient && - DwmDefWindowProc(mWnd, msg, wParam, lParam, &dwmHitResult)) { - *aRetValue = dwmHitResult; - return true; - } - // The preference whether to use a different keyboard layout for each // window is cached, and updating it will not take effect until the // next restart. We read the preference here and not upon WM_ACTIVATE to make @@ -4977,14 +4966,9 @@ bool nsWindow::ProcessMessageInternal(UINT msg, WPARAM& wParam, LPARAM& lParam, } } - /* - * If an nc client area margin has been moved, we are responsible + /* If an nc client area margin has been moved, we are responsible * for calculating where the resize margins are and returning the - * appropriate set of hit test constants. DwmDefWindowProc (above) - * will handle hit testing on it's command buttons if we are on a - * composited desktop. - */ - + * appropriate set of hit test constants. */ if (!mCustomNonClient) { break; }