mirror of
https://github.com/brl/mutter.git
synced 2024-11-23 00:20:42 -05:00
window-actor/wayland: Return success status from syncing geometry
We do this by moving it to a helper function. We will use this to keep track of when syncing the geometry is actually needed in a later commit. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3404>
This commit is contained in:
parent
90d27e7b2e
commit
ee7f13fd84
@ -522,21 +522,20 @@ maybe_configure_black_background (MetaWindowActorWayland *self,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
meta_window_actor_wayland_sync_geometry (MetaWindowActor *actor)
|
||||
static gboolean
|
||||
do_sync_geometry (MetaWindowActorWayland *self)
|
||||
{
|
||||
MetaWindowActorWayland *self = META_WINDOW_ACTOR_WAYLAND (actor);
|
||||
MetaWindowActor *actor = META_WINDOW_ACTOR (self);
|
||||
ClutterActor *surface_container = CLUTTER_ACTOR (self->surface_container);
|
||||
MetaWindow *window;
|
||||
MetaWindow *window = meta_window_actor_get_meta_window (actor);
|
||||
float surfaces_width, surfaces_height;
|
||||
float background_width, background_height;
|
||||
|
||||
window = meta_window_actor_get_meta_window (actor);
|
||||
if (window->unmanaging)
|
||||
return;
|
||||
return FALSE;
|
||||
|
||||
if (!clutter_actor_is_mapped (CLUTTER_ACTOR (actor)))
|
||||
return;
|
||||
return FALSE;
|
||||
|
||||
if (maybe_configure_black_background (self,
|
||||
&surfaces_width, &surfaces_height,
|
||||
@ -574,6 +573,16 @@ meta_window_actor_wayland_sync_geometry (MetaWindowActor *actor)
|
||||
clutter_actor_set_position (surface_container, 0, 0);
|
||||
g_clear_pointer (&self->background, clutter_actor_destroy);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
meta_window_actor_wayland_sync_geometry (MetaWindowActor *actor)
|
||||
{
|
||||
MetaWindowActorWayland *self = META_WINDOW_ACTOR_WAYLAND (actor);
|
||||
|
||||
do_sync_geometry (self);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -605,15 +614,15 @@ meta_window_actor_wayland_constructed (GObject *object)
|
||||
}
|
||||
|
||||
static void
|
||||
meta_window_actor_wayland_map (ClutterActor *self)
|
||||
meta_window_actor_wayland_map (ClutterActor *actor)
|
||||
{
|
||||
MetaWindowActorWayland *self = META_WINDOW_ACTOR_WAYLAND (actor);
|
||||
ClutterActorClass *parent_class =
|
||||
CLUTTER_ACTOR_CLASS (meta_window_actor_wayland_parent_class);
|
||||
MetaWindowActor *window_actor = META_WINDOW_ACTOR (self);
|
||||
|
||||
meta_window_actor_wayland_sync_geometry (window_actor);
|
||||
do_sync_geometry (self);
|
||||
|
||||
parent_class->map (self);
|
||||
parent_class->map (actor);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user