[mutter] window/x11: Add flag to thaw commits after resize
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] window/x11: Add flag to thaw commits after resize
- Date: Thu, 16 Jan 2020 08:50:50 +0000 (UTC)
commit 10796e672619347848d0f66f40cd9cde32994e20
Author: Olivier Fourdan <ofourdan redhat com>
Date: Fri Dec 6 13:04:12 2019 +0100
window/x11: Add flag to thaw commits after resize
To be able to thaw commits following a resize that might have frozen
commits, to keep freezes and thaws even, we need a way to tell whether
a repaint should also thaw commits.
Add a flag to `MetaWindowX11` and the appropriate functions to set and
query it.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/942
src/x11/window-x11-private.h | 3 +++
src/x11/window-x11.c | 19 +++++++++++++++++++
src/x11/window-x11.h | 4 ++++
3 files changed, 26 insertions(+)
---
diff --git a/src/x11/window-x11-private.h b/src/x11/window-x11-private.h
index a073a5b8a..621609e3e 100644
--- a/src/x11/window-x11-private.h
+++ b/src/x11/window-x11-private.h
@@ -75,6 +75,9 @@ struct _MetaWindowX11Private
MetaIconCache icon_cache;
Pixmap wm_hints_pixmap;
Pixmap wm_hints_mask;
+
+ /* Freeze/thaw on resize (for Xwayland) */
+ gboolean thaw_after_paint;
};
G_END_DECLS
diff --git a/src/x11/window-x11.c b/src/x11/window-x11.c
index 9caf75ad6..fdd86efa6 100644
--- a/src/x11/window-x11.c
+++ b/src/x11/window-x11.c
@@ -4022,3 +4022,22 @@ meta_window_x11_thaw_commits (MetaWindow *window)
MetaWindowX11 *window_x11 = META_WINDOW_X11 (window);
META_WINDOW_X11_GET_CLASS (window_x11)->thaw_commits (window);
}
+
+void
+meta_window_x11_set_thaw_after_paint (MetaWindow *window,
+ gboolean thaw_after_paint)
+{
+ MetaWindowX11 *window_x11 = META_WINDOW_X11 (window);
+ MetaWindowX11Private *priv = meta_window_x11_get_instance_private (window_x11);
+
+ priv->thaw_after_paint = thaw_after_paint;
+}
+
+gboolean
+meta_window_x11_should_thaw_after_paint (MetaWindow *window)
+{
+ MetaWindowX11 *window_x11 = META_WINDOW_X11 (window);
+ MetaWindowX11Private *priv = meta_window_x11_get_instance_private (window_x11);
+
+ return priv->thaw_after_paint;
+}
diff --git a/src/x11/window-x11.h b/src/x11/window-x11.h
index 2180ce976..7864135bb 100644
--- a/src/x11/window-x11.h
+++ b/src/x11/window-x11.h
@@ -84,4 +84,8 @@ Window meta_window_x11_get_toplevel_xwindow (MetaWindow *window);
void meta_window_x11_freeze_commits (MetaWindow *window);
void meta_window_x11_thaw_commits (MetaWindow *window);
+void meta_window_x11_set_thaw_after_paint (MetaWindow *window,
+ gboolean thaw_after_paint);
+gboolean meta_window_x11_should_thaw_after_paint (MetaWindow *window);
+
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]