This comes back to bug 42557 and co. It only does something
half-reasonable on Windows (on macOS we just lie and make z-order
tracking be latest-active tracking), and given we don't use the special
zorder flags elsewhere I'm pretty sure we should be able to just rip
this off... On some DEs like Wayland we can't re-stack toplevel windows.
Differential Revision: https://phabricator.services.mozilla.com/D213602
This never worked according to its description: it merely set the
_window-class_ background-color. We neither have nor need any mechanism
to give individual windows their own per-widget background color under
Win32.
Instead, we just set the background color to be dark grey, which is
probably good enough for the few purposes for which the background brush
is actually used. (Alas, this does not _quite_ include the initial white
flash.)
The comment in this bug about this being important for Windows dates
from bug 574638, and is no longer relevant -- at least, not in the
particular way it used to be.
Differential Revision: https://phabricator.services.mozilla.com/D212761
Otherwise we start painting the window too early, which after
bug 1891063 causes the non-client area to be filled, but we don't paint
anything on top.
Differential Revision: https://phabricator.services.mozilla.com/D208898
This implements the basic infrastructure to use use libdbusmenu to
export the Linux menubar.
For now, this is not integrated with the front-end, and there are some
remaining bugs, so it lands disabled by default behind the
widget.gtk.global-menu.enabled pref.
Differential Revision: https://phabricator.services.mozilla.com/D200259
The screen lifetime seems like it was a lot more complicated
in the past (looking at the comments in Window.webidl).
But nowadays it seems it can be more similar to the other
objects like VisualViewport etc.
Differential Revision: https://phabricator.services.mozilla.com/D193212
This adds a native fallback menu for early startup modals (e.g.
ProfileManager/ProfileDowngrade) which consists of a "Quit" menu item only,
allowing users to quit the app in a regular way (cmd+Q).
According to the bug report the "Quit" menu item used to exist but caused a
crash. With this patch crash doesn't repro anymore.
Differential Revision: https://phabricator.services.mozilla.com/D191525
The implementation of AppWindow::ForceRoundedDimensions makes clear that
the window size from GetSize` is unscaled. This patch updates the math in
FullscreenWillChange to also consider devices pixels per css pixel.
Differential Revision: https://phabricator.services.mozilla.com/D180886
This change makes the parent process delay a fullscreen request if there
is a pending fullscreen exit. It also changes the DOMFullscreenParent
actor listener lifecycle. Once it has started handling a fullscreen
request, it will remain a listener to the Document until it receives an
exit event when the manager is out of fullscreen.
Differential Revision: https://phabricator.services.mozilla.com/D175186
This patch adds two new attributes to the window's `html` element, `windowclass` and `windowname`, to allow directly controlling the window's class hints on Xorg/Wayland (`res_class` and `res_name`) from the chrome/JS code. When they are set, values are used as class hints for their window. When they are not set, the current behavior of determining `res_class` and `res_name` (using `gdk_get_program_class` for `res_class` and parsing `windowtype` for `res_name`) is preserved.
Changes in `widget/nsIWidget.h` and `widget/nsBaseWidget.h` are only interface changes so that `setWindowClass` can accept three attributes. Although this patch does not affect Windows, `widget/windows/nsWindow.h` and `widget/windows/nsWindow.cpp` have been updated to comply with the new interface. `xpfe/appshell/AppWindow.cpp` has been updated to get the additional attributes and call `setWindowClass` with them. The main changes are in `widget/gtk/nsWindow.h` and `widget/gtk/nsWindow.cpp`.
Differential Revision: https://phabricator.services.mozilla.com/D169720
Sync the chromemargin attribute to the widget before restoring the
sizes, since the later depend on the former.
This is the same order we use when sizing the shell in OnChromeLoaded,
so it should be more consistent.
Differential Revision: https://phabricator.services.mozilla.com/D168200
In this case we can do easier things than going through the shell and
assuming all sizes go through the window.
Depends on D167027
Differential Revision: https://phabricator.services.mozilla.com/D166367
Make it return a margin from client area to window area, and add an
explicit function to get the size difference.
No behavior change.
Depends on D166428
Differential Revision: https://phabricator.services.mozilla.com/D166431
Move it to the mozilla::widget namespace.
Use enum classes for transparency, popup type, popup level, etc.
Mostly automated with sed, but there were a few manual changes required
as well in windows code because they relied on Atomic<TransparencyMode>
working (which now doesn't because TransparencyMode is 1 byte instead of
4 bytes).
Differential Revision: https://phabricator.services.mozilla.com/D167537
Make it return a margin from client area to window area, and add an
explicit function to get the size difference.
No behavior change.
Depends on D166428
Differential Revision: https://phabricator.services.mozilla.com/D166431