If a MetaLater callback queued another MetaLater with a scheduling
later than the one currently being invoked, make it so that the newly
scheduled callback will actually be invoked.
The fact that it doesn't already do this is a regression from
cd7a968093.
https://bugzilla.gnome.org/show_bug.cgi?id=755605
Separate from meta-test-runner which runs metatests testing window
manager operations, a new test program (mutter-unit-tests) is
introduced. This is meant to run unit test like tests on various units
in mutter.
An initial test testing the order of MetaLater callback invokation was
added.
https://bugzilla.gnome.org/show_bug.cgi?id=755605
The constraint may be destroyed before the client destroyes the
protocol object, for example if a oneshot constraint was disabled by
alt-tab. Therefore we need to NULL check the constraint in request
handlers and ignore any requests to defunct objects.
The function should return true not only if the actor is being painted
by a ClutterClone, but also if it's inside a sub-graph being painted by
a ClutterClone.
https://bugzilla.gnome.org/show_bug.cgi?id=756371
commit 188752158 changed cogl to stop needlessly creating its own
monitor output configuration when mutter would just soon overwrite
it anyway.
Unfortunately, that commit is causing a crash in some cases because
cogl will now create and later draw to a 0x0 egl surface until mutter
sets the monitor layout.
This commit changes cogl to avoid creating and using a surface, before
it knows how big of a surface to create.
https://bugzilla.gnome.org/show_bug.cgi?id=758073
As of "core: start as wayland display server when
XDG_SESSION_TYPE=wayland" it is no longer possible to run a nested
mutter Wayland session on top of another Wayland session. This patch
adds a command line argument to make it possible to force mutter to
start as a nested compositor.
https://bugzilla.gnome.org/show_bug.cgi?id=758658
Add a gtk_shell.set_startup_id request, so the application can communicate
to the compositor the startup id that it received through the
DESKTOP_STARTUP_ID envvar, or other means.
https://bugzilla.gnome.org/show_bug.cgi?id=762268
This is kind of in a middle ground at the moment. Even though it
handles sequences not coming from libsn, they're added nowhere at
the moment, we'll rely on the app launch context being in the x11
side at the moment.
Also, even though we do create internal sequence objects, we keep
exposing SnStartupSequences to make gnome-shell happy, we could
consider making this object "public" (and the sequence objects with
it), things stay private at the moment.
https://bugzilla.gnome.org/show_bug.cgi?id=762268
Since a buffer can be used by multiple surfaces at once,
we need to release the buffer only after all surfaces
are finished with it. Currently we track whether or
not to release the buffer based on the accessible boolean.
This commit changes it to a counter to accomodate multiple
users.
Also, each surface needs to know whether not it is done with
the buffer, so this commit adds a buffer_used boolean to the
surface state.
https://bugzilla.gnome.org/show_bug.cgi?id=761613
We currently track whether or not a buffer can be released early
by looking at the copied_data boolean on the buffer. This boolean
is, practically speaking, always set to TRUE for shm buffers and is
always false otherwise.
We can just as easily check if the buffer is a shm buffer to decide
whether or not to do an early release. That's better from a
theoretical point of view since copied_data assumes a 1-to-1
relationship between surface and buffer, which may not actually hold.
This commit drops copied_data and changes the check to instead see
if the buffer is shm.
https://bugzilla.gnome.org/show_bug.cgi?id=761613
If a broken or naughty application tries set up its windows to create
a loop in the transient relationship, mutter will hang, looping forever
in meta_window_foreach_ancestor()
To avoid looping infinitely at various point in the code, check for a
possible loop when setting the transient relationship and deny the
request to set a window transient for another if that would create a
loop.
Bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=759299
meta_wayland_surface_toplevel_commit has a lot of logic to handle
a new buffer getting attached as part of the commit. None of
that code needs to run if there is no new buffer attached.
This commit short-circuits that case.
https://bugzilla.gnome.org/show_bug.cgi?id=761613
If we rely on getting back an input event with the warped pointer
coordinates, we might draw a frame with the old coordinates if we warp
during the paint phase. Avoid that by moving the cursor immediately.
https://bugzilla.gnome.org/show_bug.cgi?id=744104
This patch adds support for confinement regions that are more complex
than a single rectangle. It relies on details about cairo regions not
explicitly in the API in order to generate the outer border of the
region.
https://bugzilla.gnome.org/show_bug.cgi?id=744104
The x/y coordinates of the ClutterInputDevice were not the ones which was
the result of this event but whatever event was queued the last. The
correct coordinates can, however, be found in the event itself, so lets
use those.
https://bugzilla.gnome.org/show_bug.cgi?id=744104
The wp_pointer_constraints protocol is a protocol which enables clients
to manipulate the behavior of the pointer cursor associated with a seat.
Currently available constraints are locking the pointer to a static
position, and confining the pointer to a given region.
Currently locking is fully implemented, and confining is implemented for
rectangular confinement regions.
What else is lacking is less troublesome semantics for enabling the lock
or confinement; currently the only requirement implemented is that the
window that appears focused is the one that may aquire the lock.
This means that a pointer could be 'stolen' by creating a new window that
receives active focus, or when using focus-follows-mouse, a pointer
passes a window that has requested a lock. This semantics can be changed
and the protocol itself allows any semantics as seems fit.
https://bugzilla.gnome.org/show_bug.cgi?id=744104
In order to reuse some vector math for pointer confinement, move out
those parts to its own file, introducing the types old types
"MetaVector2" and "MetaLine2" outside of meta-barrier-native.c, as well
as introducing MetaBorder which is a line, with a blocking direction.
https://bugzilla.gnome.org/show_bug.cgi?id=744104
Add support for sending relative pointer motion deltas to clients who
request such events by creating wp_relative_pointer objects via
wp_relative_pointer_manager.
This currently implements the unstable version 1 from wayland-protocols.
https://bugzilla.gnome.org/show_bug.cgi?id=744104
The constrain callback cannot rely on the pointer position of the
corresponding ClutterInputDevice to get the actual delta of the motion
event that is to be constrained since it is only updated when an event is
dispatched. So change the API to pass the previous pointer position when
constraining.
https://bugzilla.gnome.org/show_bug.cgi?id=752752
Compositors need more detailed information about motion events. Make it
possible to retrieve this information when running the evdev backend by
adding the information to the backend specific event struct.
https://bugzilla.gnome.org/show_bug.cgi?id=752752
The code currently implements a function, get_time, that
fetches a timestamp. That duplicates code already in glib,
and the glib implementation is better, anyway, since it doesn't
skew backward when the system clock is changed.
This commit changes the code to use g_get_monotonic_time and
drop the get_time function.
https://bugzilla.gnome.org/show_bug.cgi?id=761613