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>
The underlying data structure of MtkRegion is pixman_region32, which
gives us boxes, not rectangles. Use the new get_box() API to bypass
going via rectangles to get the boxes directly.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4103>
Go one step further and pass regions. Sometimes the rectangles were
already a region, e.g. the swap-buffer case, and sometimes it still
potentially needs to pass through a rectangle array, e.g. damage with a
view transform.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4103>
Only before passing to EGL does it need to become a int tuple array.
It's used in non-EGL places which now become more easy to read. While at
it, make use of the new (and tweaked) helper function for flipping
rectangles from "cogl space" to "GL space".
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4103>
The other similar API all operate with the assumptions that (0,0) is at
the top left, so lets make damage regions behave this way too. Add a
helper to flip the rectangles, to make it a bit more convenient. It'll
be used in more places in a follow up.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4103>
Now that connectors can be configured as for lease, rename the function
to meta_kms_connector_is_non_desktop() to make clear that it returns
the hardware configuration rather than the user configuration.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4112>
Add a flag to MetaMonitor indicating if the monitor is available for
lease and store/update it from the monitor configuration.
Also, add unit tests validating that the configuration is applied and
that invalid configurations fail.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4112>
Move components without dependencies to the top and try to move
components with dependencies close to the component they depend on.
While this is an improvement, we really should start tracking and
documenting the actual dependencies between our components so that the
order here becomes comprehensible.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4018>
In acbb14f34bc8fee14e77db3c100e5d116d8e3d60, we have dropped the
is_client_decorated except it was still being used by gnome-shell
to adjust the window coordinates in case it is using server side
decoration.
Instead of re-adding the same function, expose a new function that
takes care of getting the whole client area while taking into account
SSD for X11 clients.
Helps https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7984
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4087>
The constructor already copies the pipeline which means we can add a
snippet safely without affecting the parent pipeline, without creating
another copy.
Fixes: 6b07141f1a ("clutter/paint-nodes: Make paint nodes handle color transformations")
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4037>
Instead of just adding the cogl header boilerplate, we'll redirect the
main function with #define and #undef to cogl_main(). The real main
calls the hooks-generated cogl_hooks() which chains up to the users
main() which is now called cogl_main().
<boilerplate>
#define main cogl_main
<user shader>
<hook functions>
void
cogl_hooks () {
cogl_main ();
<hook code>
}
#undef main
void main () { cogl_hooks(); }
This allows the user shader to continue using shaders which seem like
they define the main function and output to the framebuffer but also
gives the CoglPipeline a chance to add hooks.
This in particular makes our ClutterColorState transform hooks work on
user programs which are used by ClutterShaderEffects.
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7804
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7805
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/3662
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4037>
To avoid mostly going through struct fields in macros as we might soon
move those first to a WindowConfiguration & maybe even make the window
struct private with time.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4111>
As it ends up using the global default context. So just call that
directly to easily spot the remaining usages of get_default_context.
Note that the helper will probably be removed later this cycle once the
remaining usages in meta & libst have been replaced with passing around
the context
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4077>
As they are not used anywhere, in the next commit
we will just remove the whole thing and use glib helpers directly as
there is nothing specific about ClutterThread anymore
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4077>