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,
|
surface_actor_mapped_notify (MetaSurfaceActorWayland *surface_actor,
|
||||||
GParamSpec *pspec,
|
GParamSpec *pspec,
|
||||||
MetaWaylandSurface *surface);
|
MetaWaylandSurface *surface);
|
||||||
|
static void
|
||||||
|
surface_actor_allocation_notify (MetaSurfaceActorWayland *surface_actor,
|
||||||
|
GParamSpec *pspec,
|
||||||
|
MetaWaylandSurface *surface);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
unset_param_value (GParameter *param)
|
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,
|
g_signal_handlers_disconnect_by_func (surface->surface_actor,
|
||||||
surface_actor_mapped_notify,
|
surface_actor_mapped_notify,
|
||||||
surface);
|
surface);
|
||||||
|
g_signal_handlers_disconnect_by_func (surface->surface_actor,
|
||||||
|
surface_actor_allocation_notify,
|
||||||
|
surface);
|
||||||
|
|
||||||
meta_window_unmanage (surface->window, timestamp);
|
meta_window_unmanage (surface->window, timestamp);
|
||||||
}
|
}
|
||||||
@ -1291,16 +1298,17 @@ wl_surface_destructor (struct wl_resource *resource)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
surface_actor_painting (MetaSurfaceActorWayland *surface_actor,
|
surface_actor_mapped_notify (MetaSurfaceActorWayland *surface_actor,
|
||||||
MetaWaylandSurface *surface)
|
GParamSpec *pspec,
|
||||||
|
MetaWaylandSurface *surface)
|
||||||
{
|
{
|
||||||
meta_wayland_surface_update_outputs (surface);
|
meta_wayland_surface_update_outputs (surface);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
surface_actor_mapped_notify (MetaSurfaceActorWayland *surface_actor,
|
surface_actor_allocation_notify (MetaSurfaceActorWayland *surface_actor,
|
||||||
GParamSpec *pspec,
|
GParamSpec *pspec,
|
||||||
MetaWaylandSurface *surface)
|
MetaWaylandSurface *surface)
|
||||||
{
|
{
|
||||||
meta_wayland_surface_update_outputs (surface);
|
meta_wayland_surface_update_outputs (surface);
|
||||||
}
|
}
|
||||||
@ -1324,10 +1332,9 @@ meta_wayland_surface_create (MetaWaylandCompositor *compositor,
|
|||||||
wl_list_init (&surface->pending_frame_callback_list);
|
wl_list_init (&surface->pending_frame_callback_list);
|
||||||
|
|
||||||
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),
|
||||||
surface,
|
surface, 0);
|
||||||
0);
|
|
||||||
g_signal_connect_object (surface->surface_actor,
|
g_signal_connect_object (surface->surface_actor,
|
||||||
"notify::mapped",
|
"notify::mapped",
|
||||||
G_CALLBACK (surface_actor_mapped_notify),
|
G_CALLBACK (surface_actor_mapped_notify),
|
||||||
|
Loading…
Reference in New Issue
Block a user