For popup windows with parent we need to get scale factor of the parent
window. Because when the windows are hidden they're not receiving updates
about changing scaling factor. So when moving from normal dpi to
the hidpi monitor the newly opened popup windows will have the same scale.
Differential Revision: https://phabricator.services.mozilla.com/D45649
--HG--
extra : moz-landing-system : lando
Under Wayland where there's a strict popup window hierarchy, using toplevel window
for the submenus in popupnotification cause the popupnotification to hide
when opening them and this breaks user to Allow/Don't allow the action.
We have to use last opened popup window as a parent for these submenus.
Differential Revision: https://phabricator.services.mozilla.com/D45343
--HG--
extra : moz-landing-system : lando
This was fixed upstream, so we can eventually remove this.
Having the issue number makes it much nicer to figure out when is the right time
to remove it.
Differential Revision: https://phabricator.services.mozilla.com/D44624
--HG--
extra : moz-landing-system : lando
- Use former ReparentNativeWidgetInternal() code in nsWindow::SetParent().
Also update mToplevelParentWindow for Wayland to hold default toplevel window.
- Make nsWindow::ReparentNativeWidget() to work on toplevel windows only and use only gtk_window_set_transient_for() to reparent
a toplevel window. Also update mToplevelParentWindow for Wayland.
Differential Revision: https://phabricator.services.mozilla.com/D43600
--HG--
extra : moz-landing-system : lando
For popup windows with parent we need to get scale factor of the parent
window. Because when the windows are hidden they're not receiving updates
about changing scaling factor. So when moving from normal dpi to
the hidpi monitor the newly opened popup windows will have the same scale
Differential Revision: https://phabricator.services.mozilla.com/D41947
--HG--
extra : moz-landing-system : lando
Converts ui.context_menus.after_mouseup varcache pref to a static pref and removes its associated function.
Differential Revision: https://phabricator.services.mozilla.com/D43519
--HG--
extra : moz-landing-system : lando
For popup windows with parent we need to get scale factor of the parent
window. Because when the windows are hidden they're not receiving updates
about changing scaling factor. So when moving from normal dpi to
the hidpi monitor the newly opened popup windows will have the same scale
Differential Revision: https://phabricator.services.mozilla.com/D41947
--HG--
extra : moz-landing-system : lando
Under Wayland the GTK does not send the correct window state event change
when the window is iconified. We need to add a workaround for that to avoid
unresponsive UI after restoring the window.
Differential Revision: https://phabricator.services.mozilla.com/D41219
--HG--
extra : moz-landing-system : lando
The early return for non-popup windows was to workaround
https://bugzilla.mozilla.org/show_bug.cgi?id=1344839 which involved problems
with CleanLayerManagerRecursive(). In cases where layer manager configuration
does not change, there is no need to clean the layer manager and so no need to
return early.
Differential Revision: https://phabricator.services.mozilla.com/D40145
--HG--
extra : moz-landing-system : lando
If the popup is a regular menu but GetParentMenuWidget() returns
nullptr, it's connected non-menu parent (bookmark toolbar for instance).
In this case use a parent given at nsWindow::Create() and don't attach it
to latest active popup as it has a real parent.
Depends on D39347
Differential Revision: https://phabricator.services.mozilla.com/D39348
--HG--
extra : moz-landing-system : lando
- gtk_window_get_transient_for() fails to return correct toplevel window as the toplevel window changes
when popup is moved in popup hierarchy. So store the toplevel given at nsWindow::Create() and
use it instead.
- Remove some redundat NS_WARNING() from wayland code
- Attach "moved-to-rect" signal handler to GdkWindow only once a update
NativeMoveResizeWaylandPopupCallback() loging.
- Add more logging to Wayland popup related code.
Differential Revision: https://phabricator.services.mozilla.com/D39347
--HG--
extra : moz-landing-system : lando
If the popup is a regular menu but GetParentMenuWidget() returns
nullptr, it's connected non-menu parent (bookmark toolbar for instance).
In this case use a parent given at nsWindow::Create() and don't attach it
to latest active popup as it has a real parent.
Depends on D39347
Differential Revision: https://phabricator.services.mozilla.com/D39348
--HG--
extra : moz-landing-system : lando
- gtk_window_get_transient_for() fails to return correct toplevel window as the toplevel window changes
when popup is moved in popup hierarchy. So store the toplevel given at nsWindow::Create() and
use it instead.
- Remove some redundat NS_WARNING() from wayland code
- Attach "moved-to-rect" signal handler to GdkWindow only once a update
NativeMoveResizeWaylandPopupCallback() loging.
- Add more logging to Wayland popup related code.
Differential Revision: https://phabricator.services.mozilla.com/D39347
--HG--
extra : moz-landing-system : lando
When the popup is without parent it mess up with the Wayland popup hierarchy.
Then any other popup cannot be shown, for example when webrtc ui
shows up the user is unable to allow sharing screen during that.
Differential Revision: https://phabricator.services.mozilla.com/D38507
--HG--
extra : moz-landing-system : lando
This requires replacing inclusions of it with inclusions of more specific prefs
files.
The exception is that StaticPrefsAll.h, which is equivalent to StaticPrefs.h,
and is used in `Codegen.py` because doing something smarter is tricky and
suitable for a follow-up. As a result, any change to StaticPrefList.yaml will
still trigger recompilation of all the generated DOM bindings files, but that's
still a big improvement over trigger recompilation of every file that uses
static prefs.
Most of the changes in this commit are very boring. The only changes that are
not boring are modules/libpref/*, Codegen.py, and ServoBindings.toml.
Differential Revision: https://phabricator.services.mozilla.com/D39138
--HG--
extra : moz-landing-system : lando
CompositorInitiallyPaused() uses mNeedsUpdatingEGLSurface. But it is not good. mNeedsUpdatingEGLSurface is set to true in moz_container_set_initial_draw_callback(). If compositor is created before moz_container_set_initial_draw_callback(), compositor is not initially paused. It happens sometimes with popup window.
Differential Revision: https://phabricator.services.mozilla.com/D38200
--HG--
extra : moz-landing-system : lando
Only gtk returns failure ever, and nobody checks the result anyway.
Use an enum class so that it's clear from the caller what it means.
Differential Revision: https://phabricator.services.mozilla.com/D32353
--HG--
extra : moz-landing-system : lando
Only gtk returns failure ever, and nobody checks the result anyway.
Use an enum class so that it's clear from the caller what it means.
Differential Revision: https://phabricator.services.mozilla.com/D32353
--HG--
extra : moz-landing-system : lando
- Rename recent WindowBackBuffer class to WindowBackBufferShm to clearly state that it uses Shm memory to store the pixel buffer.
- Implement WindowBackBufferDMABuf which stores pixel data in GPU memory in WaylandDMABufSurface object.
- Use WaylandDMABufSurface as a wayland backend when DMABuf is available and gfx.wayland_dmabuf_backend.enabled is set.
- Implement WindowImageSurface which temporary stores front buffer pixel data. It's used when front buffer is used by compositor and we want to draw.
Instead of the front/back buffer flip and read-back data from front buffer, don't flip, store the drawing and draw the pixels when compositor
releases the front buffer.
Differential Revision: https://phabricator.services.mozilla.com/D32635
--HG--
extra : moz-landing-system : lando
Recently we track and position all popups on Wayland which leads to
wrong placement when parent popup window is hidden.
In this patch we use plain gtk_window_move() for hidden popups and
we don't track them so they can't be used as a parent window.
Also implement nsWindow::HideWaylandPopupAndAllChildren() to clearly
hide a popup window with and its children windows.
Differential Revision: https://phabricator.services.mozilla.com/D31056
--HG--
extra : moz-landing-system : lando
In order to show all popups on Wayland we need to set popup parent runtime for popups which don't have
fixed parent. For instance popup menus (fired after right button mouse click) can be issued on top of another popup
and we need to follow that connection on Wayland.
We track all open (active) popups to:
- close all visible tooltip windows when we're going to open another tooltip
- close concurrent popup on the same level when a new one is about to open
- get latest active popup as a parent for a new tooltip windows
- get latest active popup as a parent for a new popup menu without fixed parent
Differential Revision: https://phabricator.services.mozilla.com/D29348
--HG--
extra : moz-landing-system : lando