wayland: Use notify::allocation to update pointer as per confinements
There is no need to constraint the pointer to the confinement on each redraw if the surface actor didn't move/resize. https://bugzilla.gnome.org/show_bug.cgi?id=782344
This commit is contained in:
parent
cf1edff9ed
commit
27ea62a79d
@ -664,7 +664,8 @@ meta_pointer_confinement_wayland_maybe_warp (MetaPointerConfinementWayland *self
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
surface_actor_painting (MetaSurfaceActorWayland *surface_actor,
|
surface_actor_allocation_notify (MetaSurfaceActorWayland *surface_actor,
|
||||||
|
GParamSpec *pspec,
|
||||||
MetaPointerConfinementWayland *self)
|
MetaPointerConfinementWayland *self)
|
||||||
{
|
{
|
||||||
meta_pointer_confinement_wayland_maybe_warp (self);
|
meta_pointer_confinement_wayland_maybe_warp (self);
|
||||||
@ -684,8 +685,8 @@ meta_pointer_confinement_wayland_new (MetaWaylandPointerConstraint *constraint)
|
|||||||
|
|
||||||
surface = meta_wayland_pointer_constraint_get_surface (constraint);
|
surface = meta_wayland_pointer_constraint_get_surface (constraint);
|
||||||
g_signal_connect_object (surface->surface_actor,
|
g_signal_connect_object (surface->surface_actor,
|
||||||
"painting",
|
"notify::allocation",
|
||||||
G_CALLBACK (surface_actor_painting),
|
G_CALLBACK (surface_actor_allocation_notify),
|
||||||
confinement,
|
confinement,
|
||||||
0);
|
0);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user