tor-browser

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

commit 665f15a881765925549f8e6c071d0f675d64f86f
parent 8b358559a079b1330a51e2ca68619952179a1d3a
Author: Emilio Cobos Álvarez <emilio@crisal.io>
Date:   Sat, 22 Nov 2025 20:33:47 +0000

Bug 1998596 - Don't notify of moves on invisible windows. r=mac-reviewers,mstange

If we're not visible yet, our NSWindow might not have the correct frame
yet, causing us to perform a move to 0, 0, effectively losing the
anchoring.

It's a bit unclear whether we want to react to WindowMoved for popups
anyways, we generally assume we're in control of window positioning
(except for some wayland shenanigans).

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

Diffstat:
Mwidget/cocoa/nsCocoaWindow.mm | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/widget/cocoa/nsCocoaWindow.mm b/widget/cocoa/nsCocoaWindow.mm @@ -6549,8 +6549,10 @@ void nsCocoaWindow::ReportMoveEvent() { DispatchSizeModeEvent(); } - // Dispatch the move event to Gecko - NotifyWindowMoved(mBounds.x, mBounds.y); + // Dispatch the move event to Gecko, if we're visible. + if (IsVisible()) { + NotifyWindowMoved(mBounds.x, mBounds.y); + } mInReportMoveEvent = false;