wayland: Move calc-showing window logic to roles having windows
https://gitlab.gnome.org/GNOME/mutter/merge_requests/835
This commit is contained in:

committed by
Robert Mader

parent
722ae2b77a
commit
df642eb150
@ -146,6 +146,21 @@ meta_wayland_shell_surface_assigned (MetaWaylandSurfaceRole *surface_role)
|
||||
surface_role_class->assigned (surface_role);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_wayland_shell_surface_surface_pre_apply_state (MetaWaylandSurfaceRole *surface_role,
|
||||
MetaWaylandSurfaceState *pending)
|
||||
{
|
||||
MetaWaylandSurface *surface =
|
||||
meta_wayland_surface_role_get_surface (surface_role);
|
||||
MetaWindow *window;
|
||||
|
||||
window = meta_wayland_surface_get_window (surface);
|
||||
if (pending->newly_attached &&
|
||||
!surface->buffer_ref.buffer &&
|
||||
window)
|
||||
meta_window_queue (window, META_QUEUE_CALC_SHOWING);
|
||||
}
|
||||
|
||||
static void
|
||||
meta_wayland_shell_surface_surface_apply_state (MetaWaylandSurfaceRole *surface_role,
|
||||
MetaWaylandSurfaceState *pending)
|
||||
@ -277,6 +292,8 @@ meta_wayland_shell_surface_class_init (MetaWaylandShellSurfaceClass *klass)
|
||||
object_class->finalize = meta_wayland_shell_surface_finalize;
|
||||
|
||||
surface_role_class->assigned = meta_wayland_shell_surface_assigned;
|
||||
surface_role_class->pre_apply_state =
|
||||
meta_wayland_shell_surface_surface_pre_apply_state;
|
||||
surface_role_class->apply_state =
|
||||
meta_wayland_shell_surface_surface_apply_state;
|
||||
surface_role_class->notify_subsurface_state_changed =
|
||||
|
Reference in New Issue
Block a user