When creating a configuration taking orientation into account we're using
the sensors orientation even if this is currently not used (for example
when an accelerator is available, but there's no touch screen).
This would cause to have a different behavior when configuration is
created and when we're loading a known configuration on startup.
So always honor whether the monitor's orientation is managed or not.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1233>
All the auto-rotation code is expecting to have a built-in panel, but we
still monitor accelerometer changes if we don't have one (uncommon, but
possible).
Thus manage the panel orientation in such case and update it on monitors
changes.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1233>
These are ClutterInputFocus subclasses, so this will trigger reset of
the input method. As the .done event is possibly deferred in the
zwp_text_input_v3 implementation, ensure the changes caused by the
reset are flushed immediately, before the button press is forwarded
to the client by MetaWaylandPointer.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1940>
This mode is passed along by the ClutterInputMethod, the
ClutterInputFocus will preserve it and ensure it is honored
whenever the IM is being reset.
This mode is immediate. The ClutterInputFocus commits the
text directly without queueing a CLUTTER_IM_COMMIT event.
This is important so events are serialized in the right order
in the wayland implementations (i.e. commit before wl_pointer.press).
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1940>
In line with GTK, the input method context should be reset when clicks
are handled by the ClutterInputFocus user. The reset action can then
either clear or commit the preedit text, as configured by the IM module.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1940>
This commit adds support to atomic KMS backend for optional plane property
prop_fb_damage_clips. Some drivers (e.g. EVDI) take advantage of this
property and process only updated regions of the screen instead of
processing the full frame. This can save system resources.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1879>
Added a function `meta_window_set_inactive_since` it sets
xattr on the cgroup directory for the given MetaWindow.
Resource management daemons can then monitor these changes on xattr
and make allocation decisions accordingly.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1960>
Currently the only way to get cgroup for a MetaWindow is to get it's
PID and perform a bunch of file accesses and string manipulations.
This is especially not feasible if we want to get the cgroup every
time a MetaWindow has gained or lost focus.
A solution to this is to cache the GFile for a cgroup path.
The creation and access of this GFile is handled by
`meta_window_get_unit_cgroup` function.
`meta_window_unit_cgroup_equal` is a utility function which allows
us to compare whether two MetaWindows belong to the same cgroup.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1960>
To utilize the API provided by libsystemd it would be better to
create a separate HAVE_LIBSYSTEMD configuration option instead of
having to rely on HAVE_NATIVE_BACKEND.
For now this will be utilized for getting the control group of a
MetaWindow.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1960>
and the subsurface was not previously detached from it using
`wl_subsurface_destroy()`.
Without 'window-actor/wayland: Remove subsurface actors on dispose' this
test would fail.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1958>
commit c4a73e7950 added
code to cleanup the renderer when the meta backend is
disposed. Unfortunately, this introduced a crash when
the window manager is replaced.
This is because cleaning up the renderer involves talking
to the X server over a display connection that's closed
two lines higher as part of the clutter_backend_destroy
call.
This commit fixes the crash by swapping their order.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1965>
There is very little point in sending an X11 client message to
gnome-panel in case gnome-shell isn't handling the binding. We
can just as well do nothing, so do exactly that.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1886>
Using "framebuffer_discard" in the list refers to an invalid extension.
The extension which introduces glDiscardFramebufferEXT is
"GL_EXT_discard_framebuffer".
With this fix, cogl_gl_framebuffer_fbo_discard_buffers can actually call
glDiscardFramebufferEXT.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1974>
The docu for `Popen.wait()` says:
> This will deadlock when using stdout=PIPE and/or stderr=PIPE and
> the child process generates enough output to a pipe such that it
> blocks waiting for the OS pipe buffer to accept more data.
Fixes 3caa5fea3c
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1971>
If for some reason uncrustify gets angry at our file and indent on/off
marks, it will result in an error code other than 0. Since in those
cases there is no output to diff with, we misinterpret those situations
as "the whole file should be deleted", which is far from it.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1970>
Borrowed from Tracker, this script has different mode usages:
* --sha allows specifying a commit SHA, HEAD^ by default.
* --dry-run shows suggested changes in stdout, by default
the local tree is changed.
* --rewrite amends the last commit, in addition to performing
the changes.
This allows from simple style checks in the development tree,
automatically rewriting with the suggested changes (e.g. with
`git rebase --exec ./check-style -r`) and CI integration.
The script has per-function granularity, and works by re-styling
individually every commit, and inside every commit every chunk.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1924>
We fetch a frame clock that we schedule update on when queuing
_NET_WM_FRAME_DRAWN events. In some situations this frame clock is the
one from the stage, and if there are multiple hotplugs in a row, we
failed to update it as there were no stage views changes on the window
actor itself. As an actor updates the stage views list on layout, When a
queue_frame_drawn() call was done (typically from an X11 event) after a
second hotplug, it'd attempt to schedule an update on the frame clock
from the previous hotplug, as it didn't get notified about any
stage-views changes since for itself there was none.
Fix this by not caching the frame clock at all and just fetch it every
time.
In the majority of cases, this fetching means iterating over a very
short list (most often a single entry, rarely more), so it's very
unlikely to be of any relevance. The only situations where it might be a
heavier operation is the short time between a hotplug and a layout, as
it will attempt to traverse up to the stage to find a clock, but that's
likely only a few levels, so even that is unlikely to be an issue.
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4486
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1947>