Remove MOZ_USE_NATIVE_POPUP_WINDOWS in nsCocoaWindow.mm
Categories
(Core :: Widget: Cocoa, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox90 | --- | fixed |
People
(Reporter: spohl, Assigned: spohl)
References
Details
Attachments
(1 file)
We should verify that what we're doing in nsCocoaWindow.mm is still correct with native context menus enabled. Replacing MOZ_USE_NATIVE_POPUP_WINDOWS with mozilla::widget::NativeMenuSupport::ShouldUseNativeContextMenus() does not work here because not all popups are context menus. However, we may or may not want to run this for native context menus. I haven't been able to wrap my mind around the implications of running or not running this for native context menus. Markus, maybe this is a straightforward thing for you to answer? I'm happy to put up a patch as we see fit.
Assignee | ||
Updated•4 years ago
|
Comment 1•4 years ago
|
||
That's some interesting code!
I think we should remove these two lines: https://searchfox.org/mozilla-central/rev/4648b6ee31c2519b1753023e4f4853b14fdd16e5/widget/cocoa/nsCocoaWindow.mm#340-341
They would make us create a zombie widget without a native window. This is not a good API. A widget should be a widget. If the caller doesn't want a widget, they shouldn't create one - i.e. this distinction should be handled at a higher level.
With today's incarnation native context menus, I'm actually not sure if we create an nsCocoaWindow for them. In any case, if we do, we never show it. And a widget that's never shown is harmless (other than maybe wasting some minimal CPU time).
Assignee | ||
Comment 2•4 years ago
|
||
Updated•4 years ago
|
Comment 4•4 years ago
|
||
bugherder |
Description
•