Don't launch the stacking tests in one single shot, to allow better debugging
and being able to launch just one single test using meson test.
Those tests can now be all launched with:
meson test --suite stacking [single-test-name]
It's not guaranteed that a focus window will require the focus (this doesn't
happen for no-input gtk windows in fact [to be fixed there too]).
And in such case instead of unsetting the focus, while waiting the take focus
request to arrive, we should focus the current workspace default focus window
instead.
When destroying a window that has a parent, we initially try to focus one of
its ancestors. However if no ancestor can be focused, then we should instead
focus the fault window instead of trying to request focus for a window
that can't get focus anyways.
Fixes#308
When a window with no frame, that doesn't accept focus and that has no take-focus
atom set is destroyed, we end up in not changing the current_focus window, causing
a crash.
Added test cases that verify this situation (expected to fail).
See #308
Allow to set/unset WM_TAKE_FOCUS from client window.
This is added by default by gtk, but this might not happen in other toolkits,
so add an ability to (un)set this.
So fetch the protocols with XGetWMProtocols and unset the atom.
test-client now needs to depend on Xlib directly in meson build.
Initializing mutter, might cause warning such as the `failed to bind to` when
another XServer is running. However these warnings are not critical, so we can
safely ignore them.
When profiling gnome-shell it was found that one of the main triggers
of `clutter_actor_queue_relayout` during animations was
`clutter_actor_set_margin_internal` continuously setting the same
zero margins. That's obviously pointless but also expensive since it
incurs full stage relayouts and reallocation. So just avoid redundant
margin changes.
Helps to further improve:
https://gitlab.gnome.org/GNOME/mutter/issues/233,
https://gitlab.gnome.org/GNOME/gnome-shell/issues/349
Commit 8d3e05305 ("window: Force update monitor on hot plugs") added the
flag `META_WINDOW_UPDATE_MONITOR_FLAGS_FORCE` passed to
`update_monitor()` from `update_for_monitors_changed()`.
However, `update_for_monitors_changed()` may choose to call another code
path to `move_between_rects()` and `meta_window_move_resize_internal()`
eventually.
As `meta_window_move_resize_internal()` does not use the "force" flag,
we may still end up in case where the window->monitor is left unchanged.
To avoid that problem, add a new `MetaMoveResizeFlags` that
`update_for_monitors_changed()` can use to force the monitor update from
`meta_window_move_resize_internal()`.
Fixes: 8d3e05305 ("window: Force update monitor on hot plugs")
Closes: https://gitlab.gnome.org/GNOME/mutter/issues/189
Don't schedule redraws when being headless; there is nothing to draw so
don't attempt to draw. This also makes a flaky test become non-flaky, as
it previously spuriously got warnings due to windows being "painted"
when headless but lacking frame timings, as nothing was actually
painted.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/170
The empty MetaStage was in meta-stage-private.h for no reason, so lets
move it to the C file. This makes it pointless to have a private
instance struct, so just move the fields to the private struct
_MetaStage.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/170
Almost a decade old, lets just assume it's there. This makes the button
on cally-atktext-example work again when building with meson, and
probably other things too.
Instead of using gtk_css_provider_get_default(), add a
static GtkCssProvider and fetch it instead. Creating
GtkCssProviders consume a bit more memory, so keeping
a single one alive is slightly more memory saving.
It relied on indices in arrays determining tile direction and
non-obvious bitmask logic to translate to _GTK_EDGE_CONSTRAINTS. Change
this to explicitly named edge constraints, and clear translation methods
that converts between mutters and GTK+s edge constraint formats.
An unnecessary memory optimization, storing the tile mode as a 2 bit
unsigned integer, was used. While saving a few bytes, it made debugging
harder. Remove the useless byte packing.
If texture allocation fails (e.g. on an old GPU with size limit 2048)
then `update_fbo` would return `FALSE` but leaves `priv->offscreen`
as non-NULL. So the next paint will try to use the offscreen with a
`NULL` texture and crashes. The solution is simply to ensure that
`priv->offscreen` is NULL if there is no `priv->texture`, so the default
(non-offscreen) paint path gets used instead.
Bug reported and fix provided by Gert van de Kraats.
https://launchpad.net/bugs/1795774
If texture allocation fails (e.g. on an old GPU with size limit 2048)
then `cogl_texture_new_with_size` was trying to use the same CoglError
twice. The second time was after it had already been freed.
Bug reported and fix provided by Gert van de Kraats.
https://launchpad.net/bugs/1790525