mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 09:30:45 -05:00
window-actor: Remove post_init() vfunc
This vfunc was added as a was to work around the convoluted initialization process. Now that we figured it out and moved the MetaWindowActor-specific initialization to constructed(), we can override that. Remove post_init() and use GObject.constructed() entirely. https://gitlab.gnome.org/GNOME/mutter/merge_requests/368
This commit is contained in:
parent
54febd1419
commit
5fbeecaac6
@ -23,8 +23,6 @@ struct _MetaWindowActorClass
|
|||||||
void (*queue_frame_drawn) (MetaWindowActor *actor,
|
void (*queue_frame_drawn) (MetaWindowActor *actor,
|
||||||
gboolean skip_sync_delay);
|
gboolean skip_sync_delay);
|
||||||
|
|
||||||
void (*post_init) (MetaWindowActor *actor);
|
|
||||||
|
|
||||||
void (*pre_paint) (MetaWindowActor *actor);
|
void (*pre_paint) (MetaWindowActor *actor);
|
||||||
void (*post_paint) (MetaWindowActor *actor);
|
void (*post_paint) (MetaWindowActor *actor);
|
||||||
void (*queue_destroy) (MetaWindowActor *actor);
|
void (*queue_destroy) (MetaWindowActor *actor);
|
||||||
|
@ -54,11 +54,6 @@ meta_window_actor_wayland_queue_frame_drawn (MetaWindowActor *actor,
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
meta_window_actor_wayland_post_init (MetaWindowActor *actor)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
meta_window_actor_wayland_pre_paint (MetaWindowActor *actor)
|
meta_window_actor_wayland_pre_paint (MetaWindowActor *actor)
|
||||||
{
|
{
|
||||||
@ -82,7 +77,6 @@ meta_window_actor_wayland_class_init (MetaWindowActorWaylandClass *klass)
|
|||||||
window_actor_class->frame_complete = meta_window_actor_wayland_frame_complete;
|
window_actor_class->frame_complete = meta_window_actor_wayland_frame_complete;
|
||||||
window_actor_class->set_surface_actor = meta_window_actor_wayland_set_surface_actor;
|
window_actor_class->set_surface_actor = meta_window_actor_wayland_set_surface_actor;
|
||||||
window_actor_class->queue_frame_drawn = meta_window_actor_wayland_queue_frame_drawn;
|
window_actor_class->queue_frame_drawn = meta_window_actor_wayland_queue_frame_drawn;
|
||||||
window_actor_class->post_init = meta_window_actor_wayland_post_init;
|
|
||||||
window_actor_class->pre_paint = meta_window_actor_wayland_pre_paint;
|
window_actor_class->pre_paint = meta_window_actor_wayland_pre_paint;
|
||||||
window_actor_class->post_paint = meta_window_actor_wayland_post_paint;
|
window_actor_class->post_paint = meta_window_actor_wayland_post_paint;
|
||||||
window_actor_class->queue_destroy = meta_window_actor_wayland_queue_destroy;
|
window_actor_class->queue_destroy = meta_window_actor_wayland_queue_destroy;
|
||||||
|
@ -413,19 +413,6 @@ meta_window_actor_x11_queue_frame_drawn (MetaWindowActor *actor,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
meta_window_actor_x11_post_init (MetaWindowActor *actor)
|
|
||||||
{
|
|
||||||
MetaWindow *window = meta_window_actor_get_meta_window (actor);
|
|
||||||
|
|
||||||
/* If a window doesn't start off with updates frozen, we should
|
|
||||||
* we should send a _NET_WM_FRAME_DRAWN immediately after the first drawn.
|
|
||||||
*/
|
|
||||||
if (window->extended_sync_request_counter &&
|
|
||||||
!meta_window_updates_are_frozen (window))
|
|
||||||
meta_window_actor_queue_frame_drawn (actor, FALSE);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
meta_window_actor_x11_pre_paint (MetaWindowActor *actor)
|
meta_window_actor_x11_pre_paint (MetaWindowActor *actor)
|
||||||
{
|
{
|
||||||
@ -492,6 +479,23 @@ meta_window_actor_x11_paint (ClutterActor *actor)
|
|||||||
CLUTTER_ACTOR_CLASS (meta_window_actor_x11_parent_class)->paint (actor);
|
CLUTTER_ACTOR_CLASS (meta_window_actor_x11_parent_class)->paint (actor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
meta_window_actor_x11_constructed (GObject *object)
|
||||||
|
{
|
||||||
|
MetaWindowActor *window_actor = META_WINDOW_ACTOR (object);
|
||||||
|
MetaWindow *window =
|
||||||
|
meta_window_actor_get_meta_window (window_actor);
|
||||||
|
|
||||||
|
G_OBJECT_CLASS (meta_window_actor_x11_parent_class)->constructed (object);
|
||||||
|
|
||||||
|
/* If a window doesn't start off with updates frozen, we should
|
||||||
|
* we should send a _NET_WM_FRAME_DRAWN immediately after the first drawn.
|
||||||
|
*/
|
||||||
|
if (window->extended_sync_request_counter &&
|
||||||
|
!meta_window_updates_are_frozen (window))
|
||||||
|
meta_window_actor_queue_frame_drawn (window_actor, FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
meta_window_actor_x11_dispose (GObject *object)
|
meta_window_actor_x11_dispose (GObject *object)
|
||||||
{
|
{
|
||||||
@ -523,13 +527,13 @@ meta_window_actor_x11_class_init (MetaWindowActorX11Class *klass)
|
|||||||
window_actor_class->frame_complete = meta_window_actor_x11_frame_complete;
|
window_actor_class->frame_complete = meta_window_actor_x11_frame_complete;
|
||||||
window_actor_class->set_surface_actor = meta_window_actor_x11_set_surface_actor;
|
window_actor_class->set_surface_actor = meta_window_actor_x11_set_surface_actor;
|
||||||
window_actor_class->queue_frame_drawn = meta_window_actor_x11_queue_frame_drawn;
|
window_actor_class->queue_frame_drawn = meta_window_actor_x11_queue_frame_drawn;
|
||||||
window_actor_class->post_init = meta_window_actor_x11_post_init;
|
|
||||||
window_actor_class->pre_paint = meta_window_actor_x11_pre_paint;
|
window_actor_class->pre_paint = meta_window_actor_x11_pre_paint;
|
||||||
window_actor_class->post_paint = meta_window_actor_x11_post_paint;
|
window_actor_class->post_paint = meta_window_actor_x11_post_paint;
|
||||||
window_actor_class->queue_destroy = meta_window_actor_x11_queue_destroy;
|
window_actor_class->queue_destroy = meta_window_actor_x11_queue_destroy;
|
||||||
|
|
||||||
actor_class->paint = meta_window_actor_x11_paint;
|
actor_class->paint = meta_window_actor_x11_paint;
|
||||||
|
|
||||||
|
object_class->constructed = meta_window_actor_x11_constructed;
|
||||||
object_class->dispose = meta_window_actor_x11_dispose;
|
object_class->dispose = meta_window_actor_x11_dispose;
|
||||||
object_class->finalize = meta_window_actor_x11_finalize;
|
object_class->finalize = meta_window_actor_x11_finalize;
|
||||||
}
|
}
|
||||||
|
@ -431,8 +431,6 @@ meta_window_actor_constructed (GObject *object)
|
|||||||
else
|
else
|
||||||
priv->first_frame_state = DRAWING_FIRST_FRAME;
|
priv->first_frame_state = DRAWING_FIRST_FRAME;
|
||||||
|
|
||||||
META_WINDOW_ACTOR_GET_CLASS (self)->post_init (self);
|
|
||||||
|
|
||||||
meta_window_actor_sync_actor_geometry (self, priv->window->placed);
|
meta_window_actor_sync_actor_geometry (self, priv->window->placed);
|
||||||
|
|
||||||
/* Hang our compositor window state off the MetaWindow for fast retrieval */
|
/* Hang our compositor window state off the MetaWindow for fast retrieval */
|
||||||
|
Loading…
Reference in New Issue
Block a user