From e48e29db3b26cd702812d8e105be597e242ec81f Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 26 Mar 2016 10:10:16 -0400 Subject: [PATCH] wayland: Fully initialize the visual The pixel details (mask, shift and precision) are supposed to be filled in for TrueColor visuals. --- gdk/wayland/gdkscreen-wayland.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gdk/wayland/gdkscreen-wayland.c b/gdk/wayland/gdkscreen-wayland.c index c146cd3729..362029521b 100644 --- a/gdk/wayland/gdkscreen-wayland.c +++ b/gdk/wayland/gdkscreen-wayland.c @@ -921,6 +921,8 @@ gdk_wayland_screen_list_visuals (GdkScreen *screen) #define GDK_TYPE_WAYLAND_VISUAL (_gdk_wayland_visual_get_type ()) #define GDK_WAYLAND_VISUAL(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_WAYLAND_VISUAL, GdkWaylandVisual)) +/* Currently, the Wayland backend only ever uses ARGB8888. + */ static GdkVisual * gdk_wayland_visual_new (GdkScreen *screen) { @@ -930,6 +932,9 @@ gdk_wayland_visual_new (GdkScreen *screen) visual->screen = GDK_SCREEN (screen); visual->type = GDK_VISUAL_TRUE_COLOR; visual->depth = 32; + visual->red_mask = 0xff0000; + visual->green_mask = 0x00ff00; + visual->blue_mask = 0x0000ff; visual->bits_per_rgb = 8; return visual;