| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
Currently, the MetaInputDeviceNative owns the libinput_device, with the
small catch that it is eventually finished in the main thread (as the
CLUTTER_DEVICE_REMOVED event keeps the last reference to it).
Make it sure that the libinput_device is destroyed in the input thread,
before giving away the last extra input device references.
|
|
|
|
|
| |
Keep device groups as opaque pointers, and just compare those
afterwards.
|
|
|
|
| |
Remove the dependence on the underlying libinput device here.
|
|
|
|
| |
Add this info to the PadFeatures array, and pull it from there.
|
|
|
|
|
|
| |
As so paint node creation is centralized in a single function.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1355>
|
|
|
|
| |
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1355>
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the purely paint node based rendering future, ClutterEffects
simply add more paint nodes to the tree when painting the actor.
This is the leap to achieve that future.
Add paint nodes to pre_paint, paint, and post_paint, and move the
ClutterEffectNode creation to _clutter_effect_paint().
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1355>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The paint node tree that ClutterOffscreenEffect generates is
simple:
Root
|------------+
| |
Layer Pipeline
|
Actor
Right now, both pre-paint and ClutterLayerNode push the offscreen
to the framebuffer stack. That's harmless, and will go away soon
anyway.
The actor node is created and added in a separate function because
it'll be reused by the next commit.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1355>
|
|
|
|
|
|
|
|
|
| |
Add a new ClutterPaintNode parameter to the paint_target() vfunc.
For now, create a temporary ClutterEffectNode that is passed to
paint_target() and immediately painted; next commits will move
this to upper layers.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1355>
|
|
|
|
| |
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1355>
|
|
|
|
| |
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1355>
|
|
|
|
|
|
|
| |
Pretty much the exact same steps and constraints of the previous
commit.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1355>
|
|
|
|
|
|
|
|
|
|
| |
The blur pipeline is still cached on ClutterBlurEffect, and we
simply update the uniforms when asked to create the pipeline.
Now that ClutterOffscreenEffect will use the blur pipeline, it
doesn't need to override the paint_target() vfunc anymore.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1355>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The most annoying aspect of ClutterOffscreenEffect right now, and
the reason for all its subclasses to override pre-paint, is that
the pipeline creation isn't under subclasses' control. That means
all subclasses must ask ClutterOffscreenEffect to run pre-paint
and create the pipeline, then they all create their own pipelines
to paint.
To reduce this complexity, add a new create_pipeline() vfunc to
ClutterOffscreenEffect. Next commits will port effects to use this
new vfunc.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1355>
|
|
|
|
|
|
|
|
|
|
|
|
| |
ClutterLayerNode currently skips pushing the offscreen framebuffer when
no operations are set. This was added at the time because pushing and
popping was a synchronization point in Cogl, slow enough to force the
layer node to have this protective measure. Nowadays, pushing and
popping on the paint context is free.
Make ClutterLayerNode always push and pop in pre and post paint.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1355>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Xwayland in its main development branch now provides a pkg-config file
which can be used to determine Xwayland installation path and various
options enabled at build time.
Change mutter build system to optionally use that mechanism if
available. If not (as with Xwayland from the current stable branch),
keep the fallback mechanisms (basically search for the Xwayland and parse
its command line options to determine if initfd is available).
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1635>
|
| |
|
|
|
|
|
|
|
|
|
| |
ClutterBlurNode is a paint node based on ClutterLayerNode
that draws all children in an offscreen framebuffer, blurs
this framebuffer, and finally paints the blurred contents
according the the paint operations added.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1627>
|
|
|
|
|
|
|
| |
ClutterBlur is a small helper structure that implements
blurring a texture.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1627>
|
|
|
|
|
|
|
|
|
|
|
| |
Copy-paste error sneaked ClutterTransformNodeClass in
clutter_blit_node_class_init(). It wasn't problematic
because they both typedef to ClutterPaintNodeClass, but
fix it anyway.
Also switch to g_object_ref() in clutter_blit_node_new().
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1627>
|
|
|
|
|
|
| |
An oversight of 038a3170bf971a6.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1627>
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Until now we would `clutter_input_focus_set_cursor_location` with
cursor-rectangle-in-physical-pixels + actor-location-in-stage-coordinates.
But those use different scaling factors so it only got the right answer
when the framebuffer scale was 1.0.
This directly determines the geometry of the invisible dummy cursor in
gnome-shell ibusCandidatePopup.js:
```
panelService.connect('set-cursor-location', (ps, x, y, w, h) => {
this._setDummyCursorGeometry(x, y, w, h);
});
```
And because it's invisible it wasn't obvious that it was wrong until you
enable `CLUTTER_PAINT=damage-region` and you can see its ghost at the wrong
offset and scale.
So now we `clutter_input_focus_set_cursor_location` using purely unscaled
stage coordinates. And `CLUTTER_PAINT=damage-region` shows that
gnome-shell's `_dummyCursor` is placed precisely over the visible cursor.
Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3399
and probably other IBus issues that arise when using framebuffer scaling.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1576>
|
|
|
|
|
|
|
|
|
|
|
| |
`priv->cursor_rect` is stored in physical pixels, not local coordinates.
So unscale it before returning from `clutter_text_get_cursor_rect`, which
is explicitly documented as returning "actor-relative coordinates".
This went missed with fractional scaling support, and unnoticed as nobody
uses `clutter_text_get_cursor_rect` yet. But that will soon change.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1576>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before now it was assumed that the only negative local coordinates would
be those introduced by `_clutter_actor_box_enlarge_for_effects`, and we
used the difference for `fbo_offset_x/y`. But that was misguided (of me)
because gnome-shell can give us paint volumes at negative coordinates too,
like when rendering `box-shadow` on the top or left edge of an actor.
The maximum extents of negative coordinates we might need to render are
in fact the (enlarged) left and top edges of the paint volume. So use
those as the FBO offset. This places the actor's local origin correctly
within the FBO and thus also ensures it's not over-clipped at the edges
of the FBO, which now line up with the enlarged extents of the paint
volume.
This fixes one third of
https://gitlab.gnome.org/GNOME/gnome-shell/issues/1090
The other fixes required are !1053 and gnome-shell!1417.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1538>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Apparently it can happen that a timeline tries to pick a frame clock
from an actor that's on a stage, but the actor still doesn't find a
frame clock and returns NULL.
This probably is the case when starting a timeline right after attaching
an actor to a newly created stage, so before the first stage-update
cycle. In this case clutter_actor_update_stage_views() will not have run
and the stage-actor will have priv->stage_views set to NULL even though
there are stage views.
To prevent this from happening, use the complete list of stage views
maintained by the backend when picking a frame clock for the stage.
This doesn't fix any issue appearing on master, but is correct
nonetheless.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1631>
|
|
|
|
|
|
|
| |
We don't need any history, so we can save a bit of bandwidth by
omitting it, and only fetch the refs we are actually interested in.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1630>
|
|
|
|
|
|
|
|
|
|
|
| |
$CI_COMMIT_REF_NAME can be a branch name or a tag, depending on the
pipeline, but our checkout script only deals with the former at the
moment.
Address this by rather than looking for a remote branch name, just
try to fetch the ref like we do for merge request pipelines.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1630>
|
|
|
|
|
|
|
|
|
|
|
| |
We are currently not very good at communicating what's going in,
in particular for non-merge request pipelines where the output
is usually just "Using origin/master instead" (instead of what?).
Improve this by consistently communicate what we are looking for,
whether we found it, and what we end up doing.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1630>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To find XWayland output that should be the primary one, iterate through all
XWayland outputs, and compare their geometry to the geometry of the primary
logical monitor.
To avoid possible race conditions (Mutter's monitor configuration already
updated, but Xrandr not yet), set the output both after Randr notifications and
after 'monitors-changed' signal.
https://gitlab.gnome.org/GNOME/mutter/-/issues/1407
Signed-off-by: Aleksandr Mezin <mezin.alexander@gmail.com>
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1558>
|
|
|
|
|
|
|
|
|
| |
When we're running under a polyinstantiated SELinux environment, we'll
likely start with an isolated and empty /tmp, meannig no /tmp/.X11-unix
directory to add things to. To make it possible to still function in
this kind of setup, make sure said directory exists.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1626>
|
|
|
|
|
|
|
| |
It's not important, so only show it when doing MUTTER_DEBUG=wayland.
Instead report what display numbers were eventually found.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1625>
|
|
|
|
|
|
|
|
|
| |
Instead of g_warning() everywhere, use GError.
This also removes the already unused 'fatal' boolean that was still
passed around.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1625>
|
|
|
|
|
|
|
| |
We now have all info available in ClutterEvent, use it and stop poking
backend internals.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1623>
|
|
|
|
|
|
| |
This is now unused, all information belongs to ClutterEvents.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1623>
|
|
|
|
|
|
|
| |
This doesn't really hold anything now, so we can stop trying to
copy these across events.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1623>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of using native backend platform data specifically, store
this info in ClutterMotionEvent. This includes time in usec since
it's just used for motion events, in the future it could make sense
to make these general to all events again, but it could make sense
to make ClutterEvent structs private before.
In order to express that a motion event has relative motion info,
the CLUTTER_EVENT_FLAG_RELATIVE_MOTION event flag has been added
for it.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1623>
|
|
|
|
|
|
|
| |
This file doesn't really do anything much backend-dependent anymore, we
can drop these checks.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1623>
|
|
|
|
|
|
|
|
|
|
| |
We had code in both backends that sort of independently associated
sequences to slots. Make both transform slots to sequences the same
way, so they may share the implementation convert those back to slots.
This helper now lives in Clutter API.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1623>
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have this as platform-dependent data in the native backend, and
a bunch of fallback code done in place in the evcode users. Stop
making this platform-dependent data, and move it to the relevant
ClutterEvents.
The fallback code for the X11 backend case is about the same, but
now it is done directly by the X11 backend.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1623>
|
|
|
|
|
|
|
| |
This is largely unused, for long probably. We want to avoid adding
platform data to events, so that's convenient.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1623>
|
|
|
|
|
|
|
|
|
|
|
| |
Making this an event is overly convoluted, accounting that we
emit the event, then convert it to a ClutterStage signal, then
its only consumer (a11y) sets the active ATK state.
Take the event out of the equation, unify activation/deactivation
of the stage in MetaStage, and use it from the X11 backend too.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1623>
|
|
|
|
|
|
|
| |
Stop propagating this as a Clutter event. DestroyNotify is only
relevant on nested X11 sessions, so handle it specifically in place.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1623>
|
|
|
|
|
|
| |
This is used nowhere and emitted nowhere. We can do without it.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1623>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It is not possible to express a blit operation using paint
nodes as of now. This is a requirement for GNOME Shell, e.g.,
to implement its blur effect.
Add a new ClutterBlitNode node that takes two framebuffers as
input, and blits the source framebuffer into the current one
according to added rectangles.
Because this paint node uses the rectangles in a different way
compared to all the other nodes, add an auxiliary method to
ensure all blit operations are valid.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1340>
|
|
|
|
|
|
|
| |
It's useful to know which framebuffer the layer node is holding,
so serialize that too.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1340>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ClutterLayerNode is the "offscreen framebuffer" node, that paints it's
child nodes in a separate framebuffer, and then copies that framebuffer
to the parent one.
It'll be useful to hand ClutterLayerNode which framebuffer and pipeline
to use, as this is a requirement for porting e.g. ClutterOffscreenEffect
and subclasses.
Add a new clutter_layer_node_new_to_framebuffer() API.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1340>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some effects, such as ShellBlurEffect and ClutterOffscreenEffect, need
to make sure the actor is painted fully opaque. With ClutterActorNode,
however, that is currently not possible.
Add a new 'opacity' parameter to clutter_actor_node_new(). It follows
the opacity override heuristic, where -1 means disable, and anything
else is clamped to [0, 255].
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1340>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce a new paint_node vfunc that, if implemented, allows
the effect to add nodes to a transient paint node that is
immediately painted. This is a transitional step until we
have fully delegated paint node rendering.
The most basic implementation of a ClutterEffect.paint_node
vfunc, and also the default implementation, is with an actor
node, as follows:
```
static void
foo_bar_paint_node (ClutterEffect *effect,
ClutterPaintNode *node,
ClutterPaintContext *paint_context,
ClutterEffectPaintFlags flags)
{
g_autoptr (ClutterPaintNode) actor_node = NULL;
actor_node = clutter_actor_node_new (effect->actor);
clutter_paint_node_add_child (node, actor_node);
}
```
This example gives the exact same behavior of simply calling
clutter_actor_continue_paint(). In the future, the paint node
itself will be a parameter of clutter_actor_continue_paint()
and we'll be able to simplify it event more.
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1340>
|