1
0
Fork 0

window: Move xvisual to WindowX11

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3211>
This commit is contained in:
Bilal Elmoussaoui 2023-08-24 09:54:20 +02:00 committed by Robert Mader
parent 2a75661883
commit d98b0eb71e
4 changed files with 6 additions and 4 deletions

View file

@ -179,7 +179,6 @@ struct _MetaWindow
/* may be NULL! not all windows get decorated */
MetaFrame *frame;
int depth;
Visual *xvisual;
char *desc; /* used in debug spew */
char *title;

View file

@ -836,7 +836,6 @@ meta_window_wayland_constructed (GObject *object)
window->size_hints.height = 0;
window->depth = 24;
window->xvisual = NULL;
window->mapped = FALSE;

View file

@ -75,6 +75,8 @@ struct _MetaWindowX11Private
/* Freeze/thaw on resize (for Xwayland) */
gboolean thaw_after_paint;
Visual *xvisual;
/* Bypass compositor hints */
MetaBypassCompositorHint bypass_compositor;

View file

@ -2020,7 +2020,7 @@ meta_window_x11_constructed (GObject *object)
window->size_hints.height = attrs.height;
window->depth = attrs.depth;
window->xvisual = attrs.visual;
priv->xvisual = attrs.visual;
window->mapped = attrs.map_state != IsUnmapped;
window->decorated = TRUE;
@ -4307,11 +4307,13 @@ gboolean
meta_window_x11_has_alpha_channel (MetaWindow *window)
{
MetaX11Display *x11_display = window->display->x11_display;
MetaWindowX11 *windox_x11 = META_WINDOW_X11 (window);
MetaWindowX11Private *priv = meta_window_x11_get_instance_private (windox_x11);
int n_xvisuals;
gboolean has_alpha;
XVisualInfo *xvisual_info;
XVisualInfo template = {
.visualid = XVisualIDFromVisual (window->xvisual),
.visualid = XVisualIDFromVisual (priv->xvisual),
};
xvisual_info = XGetVisualInfo (meta_x11_display_get_xdisplay (x11_display),