When we open a new window on top of a fullscreen window, we deliberately
make that window "normal" (non-fullscreen, non-maximized), which was
documented as having been "a standard [W]indows convention" [1].
Chromium does the same (with fiddly differences involving the window
size).
Unfortunately, we do this by checking if there are _any_ fullscreen
windows open -- which produces false positives on multimonitor or
multi-virtual-desktop setups.
Therefore, adjust the code to match the original comment, and only take
the parent window into account. This seems likely to better match user
expectations.
[1] https://bugzilla.mozilla.org/show_bug.cgi?id=575195#c5
Differential Revision: https://phabricator.services.mozilla.com/D197823
Before bug 1869796 they had an utility type hint, now they have a
toplevel type hint, after the patch they have a notification type hint,
which seems more appropriate.
Differential Revision: https://phabricator.services.mozilla.com/D197872
These are only used right now for XUL notifications. They are extremely
weird (I bet there's tons of code that assume that WindowType::Popup
corresponds to nsMenuPopupFrame), and afaict there's no good reason why
these have to be this way.
They no longer are on Linux (because Wayland doesn't support such
thing for example).
XUL alerts work fine with this patch on all platforms after some basic
testing.
The other usage of this for the gfx sanity test can use type=dialog.
Actually it can just be a toplevel, but that breaks the XUL skeleton UI.
Differential Revision: https://phabricator.services.mozilla.com/D196665
These are only used right now for XUL notifications. They are extremely
weird (I bet there's tons of code that assume that WindowType::Popup
corresponds to nsMenuPopupFrame), and afaict there's no good reason why
these have to be this way.
They no longer are on Linux (because Wayland doesn't support such
thing for example).
XUL alerts work fine with this patch on all platforms after some basic
testing.
Depends on D196664
Differential Revision: https://phabricator.services.mozilla.com/D196665
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
Also explicitly use titlebar=no on the PIP window, since we really don't
want a titlebar.
This way we don't end up without titlebars in other alwaysontop windows.
Differential Revision: https://phabricator.services.mozilla.com/D172992
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
With this patch the webrtcIndicator is no longer considered a PIP window on GTK.
This makes the webrtcIndicator *not* show a resize cursor over most of its
surface.
Differential Revision: https://phabricator.services.mozilla.com/D169783
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