There were things hooked up (connecting signals, adding stage watches),
but it was a bit disorganized, with "adding watches" doing more, and
"init callbacks" being a bit vague. Split things up to
* setup view - hook up things that need to listen on a stage view
* setup cursor tracking - track cursor positions, sprite changes
* the rest - monitor changes etc
This also properly handles a race condition when we'll enable before the
idle callback creating the view from the virtual monitors is run.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4066>
The hardware cursor support in the cursor renderer now acts on a per
stage view basis, so no need to inhibit the hardware cursor, it isn't
going to try to put a hardware cursor on a virtual CRTC anyway.
Instead use overlay inhibitation to decide whether an cursor overlay
should be painted or not. Inhibit the overlay when hidden/metadata, but
not when embedded.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4066>
There's a workaround (ec18a559c687 ("monitor-manager: Ignore
tablet-mode-switch on initial config of native portrait mode panels")) for
panels that default to portrait mode, where touch mode is disabled, but
a touchscreen is present. This workaround gets applied when we receive
the first reading from the orientation manager.
Make sure this workaround is applied as expected by adding a test for it.
The test needs to be first in the list of orientation tests, because mutter
only applies the workaround on the first orientation event it receives.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4126>
The MetaWindowConfig can indicate whether the configuration reflects on
the initial configuration, before the window is first mapped.
Add a smaller helper (private) window function to create the appropriate
"type" of MetaWindowConfig depending whether the window was already
showed or not.
This is preparation work for the following commits where this function
will be used.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4076>
Use the meta_window_is_fullscreen() API instead of accessing the
fullscreen field of the MetaWindow structure directly.
This is both a (small) cleanup and preparation work for the next commit.
No function change (intended).
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4076>
This is intended to be used in place of the window rect and fullscreen
flags.
That will also allow for a pre-configuration signal to be added, passing
the configuration so that a plugin can tweak the configuration before it
gets applied first.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4076>
Some laptops don't have the integrated GPU come earlier in the PCI topology
which means that when mutter enumerates the GPUs it may select the dGPU
as the primary.
In a laptop context, this is unlikely to work because the eDP panel can
only be actively connected to a single GPU at a time.
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3746
Suggested-by: Jonas Ådahl
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4114>
The client may not wait for devices to be created before enabling,
meaning we might activate the input capture session before the device
emulation is started. This would result in events silently being
dropped.
This helps with the flaky input-capture test case.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4128>
Since 1eba07f6 the size of a boxed value is read when calling
_cogl_boxed_value_set_x(). This results in an uninitialized read when
setting uniforms using cogl_pipeline_set_uniform_*() since the size was
not initialized by _cogl_pipeline_override_uniform() when these
functions call _cogl_boxed_value_set_*().
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4125>
Use the 'seq' field in the spa_meta_header struct to track buffer
sequence numbers. This can be useful for predictable buffer tracking in
consumers, or for debugging purposes.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4065>
This will become important when dispatching happens from a frame clock
driver, where the driver itself triggers from a GSource. If the driver
source has a higher priority, we'll risk dispatching before the frame
clock has returned to a state expecting to be dispatched.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4065>
We can't unfortunately use the macros for the sub-types as the whole GL
variant of the texture wants access to the struct fields even when using
a macro like COGL_DECLARE_INTERNAL_TYPE. So we would have to re-do the
whole driver integration first.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4100>
Touch devices are handled very similarly to how absolute pointer
devices, by creating either shared or standalone devices depending on
what kind of monitor it's associated with.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4064>
A EIS client might want to unbind a device capability; doing so should
effectively remove the device, which we didn't. Instead we always
created devices that a seat bind event had capabilities set for.
Fix this by explicitly keeping track of what is our "keyboard", our
"pointer", and whether we have a set of abs pointers, and don't create
duplicates if we already have devices created. For absolute pointer
devices, just keep track if we should have them, because we might have
many, or none, if we happen to be headless at the time being.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4064>
We don't need two separate configuration helpers, they do the same
thing. This will simplify making the viewport dependent device creation
more generic and reusable.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4064>
For some reason the variable for the *Native subclass of
MetaVirtualInputDevice was suffixed with _evdev. Long long ago the input
backend in clutter was called "evdev", so might be because of that.
Anyway, lets rename to something more closely related, i.e. _native.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4064>