Mutter 3.36 requests exact match of wl_surface/wl_subsurface size so we need to respect
wl_surface size (GtkWidget size) and create a wl_subsurface with the same size.
Differential Revision: https://phabricator.services.mozilla.com/D67137
--HG--
extra : moz-landing-system : lando
Since bug 440895, we've got support in sessionstore to support restoring a window
to their respective virtual desktops.
This patch using a deprecated GDK API. It builds and works fine, but not without
compilation warnings.
Differential Revision: https://phabricator.services.mozilla.com/D65105
--HG--
extra : moz-landing-system : lando
Recently opaque region is set when wl_surface is obtained by renderer/compositor.
It does not work as GL/WebRender get wl_surface only once and creates egl_window
on top of it so the opaque region is never updated.
Differential Revision: https://phabricator.services.mozilla.com/D64583
--HG--
extra : moz-landing-system : lando
The most common case is that the popup is attached to last opened window. First
we need to hide tooltips so we don't attach the new window to them, then the
menu tree has to be clean up to also avoid wrong popup parent.
If there is no window opened we will attach the window to the toplevel window.
There's also one exception regarding widget-overflow panel: popups with remote content
and widget-overflow panel have to replace all other windows otherwise they will be
attached to wrong parent.
Differential Revision: https://phabricator.services.mozilla.com/D61694
--HG--
extra : moz-landing-system : lando
Calling gtk_window_hide without pausing renderer cause crashes. Also to avoid repeated calls of NativeMoveResizeWaylandPopup from NativeMoveResizeWaylandPopup we don't call Resize or Move anymore, we just update mBounds which is enough.
Differential Revision: https://phabricator.services.mozilla.com/D61312
--HG--
extra : moz-landing-system : lando
Calling gtk_window_hide without pausing renderer cause crashes. Also to avoid repeated calls of NativeMoveResizeWaylandPopup from NativeMoveResizeWaylandPopup we don't call
Resize or Move anymore, we just update mBounds which is enough.
Differential Revision: https://phabricator.services.mozilla.com/D61312
--HG--
extra : moz-landing-system : lando
The idle-inhibit protocol allows idle wake locks on Wayland
without any of the supported D-Bus interfaces running.
Differential Revision: https://phabricator.services.mozilla.com/D49095
--HG--
extra : moz-landing-system : lando
Calculate and set correct opaque regions for all wl_surfaces, which are:
- mShell - toplevel window with CSD decorations, opaque mask needs to be shifted by titlebar/CSD size and subtracted transparent corners.
- mContainer - child window with subtracted transparent corners.
Differential Revision: https://phabricator.services.mozilla.com/D57797
--HG--
extra : moz-landing-system : lando
Calculate and set correct opaque regions for all wl_surfaces, which are:
- mShell - toplevel window with CSD decorations, opaque mask needs to be shifted by titlebar/CSD size and subtracted transparent corners.
- mContainer - child window with subtracted transparent corners.
Differential Revision: https://phabricator.services.mozilla.com/D57797
--HG--
extra : moz-landing-system : lando
- Invalidate mBounds when window state is changed. That ensures we get new window size from configure event.
- Join Resize() routines and use ResizeInt() for the actual resize work.
- Add more logging to nsWindow file.
Differential Revision: https://phabricator.services.mozilla.com/D57763
--HG--
extra : moz-landing-system : lando
Don't use CSD decoration size to get ClientOffset at UpdateClientOffsetFromCSDWindow()
but rather get it from gdk_window_get_position() which is more universal and it's available on Gtk < 3.20.
As we can't call gdk_window_get_position() right after titlebar on/off switch (mContainer is not positioned yet),
use mClientOffsetCSDNeedsUpdate flag to delay it.
Also request ClientOffset update on scale change which is missing now.
Rename UpdateClientOffset() to UpdateClientOffsetFromFrameExtents() to explicitly
state its function and make it similar to UpdateClientOffsetFromCSDWindow().
It depends on https://phabricator.services.mozilla.com/D57763 which needs to be checked first.
Differential Revision: https://phabricator.services.mozilla.com/D57302
--HG--
extra : moz-landing-system : lando
On GTK changing gtk-enable-animation in a process doesn't affect in different
processes for some reasons. So we take the same approach as what we did for
OSX[1] that is when SetPrefersReducedMotionOverrideForTest is called we set the
given value as a cache in the parent process and send a notification to system
as if the value changed thus the notification kicks PBroser.ThemeChanged to
update the cache in the content process, thus we can use the cache value on
querying the corresponding value in the content process.
[1] https://hg.mozilla.org/mozilla-central/rev/67a5acf7363d
Differential Revision: https://phabricator.services.mozilla.com/D57260
--HG--
extra : moz-landing-system : lando
On GTK changing gtk-enable-animation in a process doesn't affect in different
processes for some reasons. So we take the same approach as what we did for
OSX[1] that is when SetPrefersReducedMotionOverrideForTest is called we set the
given value as a cache in the parent process and send a notification to system
as if the value changed thus the notification kicks PBroser.ThemeChanged to
update the cache in the content process, thus we can use the cache value on
querying the corresponding value in the content process.
[1] https://hg.mozilla.org/mozilla-central/rev/67a5acf7363d
Differential Revision: https://phabricator.services.mozilla.com/D57260
--HG--
extra : moz-landing-system : lando
Usually we update mBounds from OnSizeAllocate() which is called
by Gtk when mContainer changes its actual size.
However we need to set mBounds in advance at Resize() as JS
code expect immediate window size change. When Resize() is called between
SetSizeMode() calls (which maximize/unmaximize the window) we can miss
OnSizeAllocate() Gtk call as actual mContainer size may not change
from Gtk perspective and we end up with incorrect mBounds.
To compensate it call OnSizeAllocate() explicitly also
from OnConfigureEvent() after size mode change.
Differential Revision: https://phabricator.services.mozilla.com/D55941
--HG--
extra : moz-landing-system : lando
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.
find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
if [ -n "$interfaces" ]; then
if [[ "$interfaces" == *$'\n'* ]]; then
regexp="\("
for i in $interfaces; do regexp="$regexp$i\|"; done
regexp="${regexp%%\\\|}\)"
else
regexp="$interfaces"
fi
interface=$(basename "$path")
rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
if [ $hits -eq 0 ]; then
echo "Removing ${interface} from ${path2}"
grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
mv -f "$path2".tmp "$path2"
fi
done
fi
done
Differential Revision: https://phabricator.services.mozilla.com/D55444
--HG--
extra : moz-landing-system : lando
Lets Wayland sessions run vsync off wayland surface frame callbacks by creating
an interface for widgets to return a local VsyncSource, if applicable.
This interface is currently used for the compositor, and for refresh drivers
in the parent process. It is not yet used for vsync in content processes.
Differential Revision: https://phabricator.services.mozilla.com/D28430
--HG--
extra : moz-landing-system : lando
Items in overflow-widget which belongs to addons cannot have
the overflow-widget panel set as a popup parent because the
overflow-widget is replaced by them.
We also need to close the addon panel before we return back
to overflow-widget to avoid simillar problem.
Differential Revision: https://phabricator.services.mozilla.com/D53011
--HG--
extra : moz-landing-system : lando
Items in overflow-widget which belongs to addons cannot have
the overflow-widget panel set as a popup parent because the
overflow-widget is replaced by them.
We also need to close the addon panel before we return back
to overflow-widget to avoid simillar problem.
Differential Revision: https://phabricator.services.mozilla.com/D53011
--HG--
extra : moz-landing-system : lando
The reason of the crash is, the window may have already been destroyed and
`PuppetWidget::mBrowserChild` was set to `nullptr` when synthesizing key event.
This patch makes `PuppetWidget::GetEditCommands()` check whether it's `nullptr`
and returns whether it's succeeded or not. Therefore, `TextInputProcessor`
can throw exception in such case.
Differential Revision: https://phabricator.services.mozilla.com/D52308
--HG--
extra : moz-landing-system : lando
This patch fixes activation of the :-moz-window-inactive pseudoclass in client side decoration during drag operations. It depends on and complements the fixes provided in support of Bug 1491808.
Obsoletes D50445
Differential Revision: https://phabricator.services.mozilla.com/D51307
--HG--
extra : moz-landing-system : lando
By getting the right screen size we can shrink the popup menus which overflows
the screen size under Wayland. The ScreenManager does not help us, because we
can't get absolute window position, but we can use gdk_display_get_monitor_at_window
and gdk_monitor_get_workarea to get the correct screen rectangle.
Differential Revision: https://phabricator.services.mozilla.com/D49289
--HG--
extra : moz-landing-system : lando
By getting the right screen size we can shrink the popup menus which overflows
the screen size under Wayland. The ScreenManager does not help us, because we
can't get absolute window position, but we can use gdk_display_get_monitor_at_window
and gdk_monitor_get_workarea to get the correct screen rectangle.
Differential Revision: https://phabricator.services.mozilla.com/D49289
--HG--
extra : moz-landing-system : lando
We can't set wl_egl_window from widget code as it must match GL rendering pipeline,
so let compositor to set the egl window size.
Depends on D49136
Differential Revision: https://phabricator.services.mozilla.com/D49137
--HG--
extra : moz-landing-system : lando
We can't set wl_egl_window from widget code as it must match GL rendering pipeline,
so let compositor to set the egl window size.
Depends on D49136
Differential Revision: https://phabricator.services.mozilla.com/D49137
--HG--
extra : moz-landing-system : lando
Under Wayland it is possible to add only one popup window
to a parent window. If we try to attach another popup to the window,
the GTK refuses to do that. This can happen when the previous popup
has not yet been hidden while the new popup is showing (in some cases
the nsWindow::Show(false) for the previous popup is not called before
nsWindow::Show(true) for the new one).
We deal with it by hiding wayland popups which are no longer in the
XULPopupManager (PM) before showing a new one. We only do that for
the main menu popups or context (sub)menus. We cannot use PM to check
for the panel popup content like Folder dropdown in Edit Bookmark panel
or WebRTC microphone/video source dropdown. In that case we simply use
the last shown popup as a transient for the new one or the toplevel window.
Differential Revision: https://phabricator.services.mozilla.com/D47610
--HG--
extra : moz-landing-system : lando
Under Wayland it is possible to add only one popup window
to a parent window. If we try to attach another popup to the window,
the GTK refuses to do that. This can happen when the previous popup
has not yet been hidden while the new popup is showing (in some cases
the nsWindow::Show(false) for the previous popup is not called before
nsWindow::Show(true) for the new one).
We deal with it by hiding wayland popups which are no longer in the
XULPopupManager (PM) before showing a new one. We only do that for
the main menu popups or context (sub)menus. We cannot use PM to check
for the panel popup content like Folder dropdown in Edit Bookmark panel
or WebRTC microphone/video source dropdown. In that case we simply use
the last shown popup as a transient for the new one or the toplevel window.
Differential Revision: https://phabricator.services.mozilla.com/D47610
--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
- 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