When building with the macOS 14 SDK, windows cannot be moved on macOS 14
Categories
(Core :: Widget: Cocoa, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox120 | --- | fixed |
People
(Reporter: mstange, Assigned: bradwerth)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
When building with the macOS 14 SDK, windows cannot be moved by dragging them. This only affects macOS 14 Sonoma.
This needs to be fixed before we can build Firefox with the macOS 14 SDK (bug 1855564).
See bug 1856296 for when we accidentally shipped this to Nightly.
Reporter | ||
Comment 1•1 year ago
•
|
||
Copying over my comments from the other bug:
(In reply to Markus Stange [:mstange] from bug 1856296 comment #11)
We implement window dragging by setting up our NSView hierarchy in such a way that the NSViews in the back return
YES
frommovableByWindowBackground
, and then we place non-movable transparent NSViews in the non-movable regions of the window (they returnNO
frommovableByWindowBackground
). See here for more details.We also have a hack here to avoid paints which might be causing problems and which might be unnecessary these days.
(In reply to Markus Stange [:mstange] from bug 1856296 comment #12)
When debugging this, I suggest the following approach: First, try to remove the call to
ManipulateViewWithoutNeedingDisplay
(just callmNonDraggableRegion.UpdateRegion
directly). If that doesn't fix it, dump the NSView hierarchy starting at the window's border view ([[window contentView] superview]
) along with each view'smovableByWindowBackground
property. There may also be aNSWindow
styleMask flag that affects this behavior.
Reporter | ||
Comment 2•1 year ago
|
||
The macOS 14 AppKit release notes mention a change to clipToBounds
:
For applications linked against the macOS 14 SDK, the default value of this property is
false
. Apps linked against older SDKs default totrue
.
I wonder if there's a view in our view hierarchy which is not movableByWindowBackground
which used to be clipped out and is now not clipped out any more and interferes with the dragging.
Assignee | ||
Comment 3•1 year ago
•
|
||
This can be fixed very simply by setting clipToBounds
on the NonDraggableView
s we create in ViewRegion::UpdateRegion
. That's not as satisfying as I would like, because it seems to imply that the problem is some kind of view added to one of the NonDraggableView
objects, and I don't see where that could be done. I'll post the fix here and we'll discuss in review if we want to push for a better-understood solution.
Assignee | ||
Comment 4•1 year ago
|
||
Or perhaps the container view only respects the bounds of its subviews if those subviews have clipToBounds
set, as if it's checking their clip rather than their bounds.
Assignee | ||
Comment 5•1 year ago
|
||
Updated•1 year ago
|
Comment 7•1 year ago
|
||
bugherder |
Description
•