window: Move out 'updates frozen' state into implementations
Implementation of said state was just related to X11, so move it into window-x11.c. The Wayland path always fell back on the returning TRUE, so just do that for now. https://gitlab.gnome.org/GNOME/mutter/merge_requests/229
This commit is contained in:
parent
8685de9607
commit
e2e7296612
@ -565,6 +565,7 @@ struct _MetaWindowClass
|
||||
gboolean (*shortcuts_inhibited) (MetaWindow *window,
|
||||
ClutterInputDevice *source);
|
||||
gboolean (*is_stackable) (MetaWindow *window);
|
||||
gboolean (*are_updates_frozen) (MetaWindow *window);
|
||||
};
|
||||
|
||||
/* These differ from window->has_foo_func in that they consider
|
||||
|
@ -3743,14 +3743,7 @@ meta_window_activate_with_workspace (MetaWindow *window,
|
||||
gboolean
|
||||
meta_window_updates_are_frozen (MetaWindow *window)
|
||||
{
|
||||
if (window->extended_sync_request_counter &&
|
||||
window->sync_request_serial % 2 == 1)
|
||||
return TRUE;
|
||||
|
||||
if (window->sync_request_serial < window->sync_request_wait_serial)
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
return META_WINDOW_GET_CLASS (window)->are_updates_frozen (window);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -573,6 +573,12 @@ meta_window_wayland_is_stackable (MetaWindow *window)
|
||||
return meta_wayland_surface_get_buffer (window->surface) != NULL;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
meta_window_wayland_are_updates_frozen (MetaWindow *window)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
meta_window_wayland_class_init (MetaWindowWaylandClass *klass)
|
||||
{
|
||||
@ -593,6 +599,7 @@ meta_window_wayland_class_init (MetaWindowWaylandClass *klass)
|
||||
window_class->force_restore_shortcuts = meta_window_wayland_force_restore_shortcuts;
|
||||
window_class->shortcuts_inhibited = meta_window_wayland_shortcuts_inhibited;
|
||||
window_class->is_stackable = meta_window_wayland_is_stackable;
|
||||
window_class->are_updates_frozen = meta_window_wayland_are_updates_frozen;
|
||||
}
|
||||
|
||||
MetaWindow *
|
||||
|
@ -1577,6 +1577,19 @@ meta_window_x11_is_stackable (MetaWindow *window)
|
||||
return !window->override_redirect;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
meta_window_x11_are_updates_frozen (MetaWindow *window)
|
||||
{
|
||||
if (window->extended_sync_request_counter &&
|
||||
window->sync_request_serial % 2 == 1)
|
||||
return TRUE;
|
||||
|
||||
if (window->sync_request_serial < window->sync_request_wait_serial)
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
meta_window_x11_class_init (MetaWindowX11Class *klass)
|
||||
{
|
||||
@ -1601,6 +1614,7 @@ meta_window_x11_class_init (MetaWindowX11Class *klass)
|
||||
window_class->force_restore_shortcuts = meta_window_x11_force_restore_shortcuts;
|
||||
window_class->shortcuts_inhibited = meta_window_x11_shortcuts_inhibited;
|
||||
window_class->is_stackable = meta_window_x11_is_stackable;
|
||||
window_class->are_updates_frozen = meta_window_x11_are_updates_frozen;
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user