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
This commit is contained in:
parent
845157c111
commit
10796e6726
@ -75,6 +75,9 @@ struct _MetaWindowX11Private
|
|||||||
MetaIconCache icon_cache;
|
MetaIconCache icon_cache;
|
||||||
Pixmap wm_hints_pixmap;
|
Pixmap wm_hints_pixmap;
|
||||||
Pixmap wm_hints_mask;
|
Pixmap wm_hints_mask;
|
||||||
|
|
||||||
|
/* Freeze/thaw on resize (for Xwayland) */
|
||||||
|
gboolean thaw_after_paint;
|
||||||
};
|
};
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
@ -4022,3 +4022,22 @@ meta_window_x11_thaw_commits (MetaWindow *window)
|
|||||||
MetaWindowX11 *window_x11 = META_WINDOW_X11 (window);
|
MetaWindowX11 *window_x11 = META_WINDOW_X11 (window);
|
||||||
META_WINDOW_X11_GET_CLASS (window_x11)->thaw_commits (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;
|
||||||
|
}
|
||||||
|
@ -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_freeze_commits (MetaWindow *window);
|
||||||
void meta_window_x11_thaw_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
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user