mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
wayland: Use notify::allocation notification to update surface outputs
Instead of updating the surface outputs on each actor ::paint. https://bugzilla.gnome.org/show_bug.cgi?id=782344
This commit is contained in:
parent
5cb5baa7d4
commit
cf1edff9ed
@ -176,6 +176,10 @@ static void
|
||||
surface_actor_mapped_notify (MetaSurfaceActorWayland *surface_actor,
|
||||
GParamSpec *pspec,
|
||||
MetaWaylandSurface *surface);
|
||||
static void
|
||||
surface_actor_allocation_notify (MetaSurfaceActorWayland *surface_actor,
|
||||
GParamSpec *pspec,
|
||||
MetaWaylandSurface *surface);
|
||||
|
||||
static void
|
||||
unset_param_value (GParameter *param)
|
||||
@ -414,6 +418,9 @@ meta_wayland_surface_destroy_window (MetaWaylandSurface *surface)
|
||||
g_signal_handlers_disconnect_by_func (surface->surface_actor,
|
||||
surface_actor_mapped_notify,
|
||||
surface);
|
||||
g_signal_handlers_disconnect_by_func (surface->surface_actor,
|
||||
surface_actor_allocation_notify,
|
||||
surface);
|
||||
|
||||
meta_window_unmanage (surface->window, timestamp);
|
||||
}
|
||||
@ -1291,14 +1298,15 @@ wl_surface_destructor (struct wl_resource *resource)
|
||||
}
|
||||
|
||||
static void
|
||||
surface_actor_painting (MetaSurfaceActorWayland *surface_actor,
|
||||
surface_actor_mapped_notify (MetaSurfaceActorWayland *surface_actor,
|
||||
GParamSpec *pspec,
|
||||
MetaWaylandSurface *surface)
|
||||
{
|
||||
meta_wayland_surface_update_outputs (surface);
|
||||
}
|
||||
|
||||
static void
|
||||
surface_actor_mapped_notify (MetaSurfaceActorWayland *surface_actor,
|
||||
surface_actor_allocation_notify (MetaSurfaceActorWayland *surface_actor,
|
||||
GParamSpec *pspec,
|
||||
MetaWaylandSurface *surface)
|
||||
{
|
||||
@ -1324,10 +1332,9 @@ meta_wayland_surface_create (MetaWaylandCompositor *compositor,
|
||||
wl_list_init (&surface->pending_frame_callback_list);
|
||||
|
||||
g_signal_connect_object (surface->surface_actor,
|
||||
"painting",
|
||||
G_CALLBACK (surface_actor_painting),
|
||||
surface,
|
||||
0);
|
||||
"notify::allocation",
|
||||
G_CALLBACK (surface_actor_allocation_notify),
|
||||
surface, 0);
|
||||
g_signal_connect_object (surface->surface_actor,
|
||||
"notify::mapped",
|
||||
G_CALLBACK (surface_actor_mapped_notify),
|
||||
|
Loading…
Reference in New Issue
Block a user