diff --git a/src/core/window-private.h b/src/core/window-private.h index c47de087a..26206c3d1 100644 --- a/src/core/window-private.h +++ b/src/core/window-private.h @@ -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 diff --git a/src/core/window.c b/src/core/window.c index a0a986e79..c51cd29dc 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -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 diff --git a/src/wayland/meta-window-wayland.c b/src/wayland/meta-window-wayland.c index 42fcde7b0..46ee78095 100644 --- a/src/wayland/meta-window-wayland.c +++ b/src/wayland/meta-window-wayland.c @@ -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 * diff --git a/src/x11/window-x11.c b/src/x11/window-x11.c index b2b2c9cb3..4b27892ac 100644 --- a/src/x11/window-x11.c +++ b/src/x11/window-x11.c @@ -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