Package: xfwm4
Version: 4.12.3-1
Severity: normal
Tags: patch

Dear Maintainer,

When running X in 30-bit color depth window borders and title bars are garbled
as in the screenshot [1].

The following messages are written to ~/.xsession-errors:

(xfwm4:3619): Gdk-CRITICAL **: IA__gdk_drawable_set_colormap: assertion 'cmap 
== NULL || gdk_drawable_get_depth (drawable) == cmap->visual->depth' failed
(xfwm4:3619): Gdk-WARNING **: 
/tmp/buildd/gtk+2.0-2.24.28/gdk/gdkpixbuf-drawable.c:1249: Source drawable has 
no colormap; either pass in a colormap, or set the colormap on the drawable 
with gdk_drawable_set_colormap()
(xfwm4:3619): Gdk-WARNING **: The gdk_draw_*_image require the drawable 
argument to
have a specified colormap. All windows have a colormap,
however, pixmaps only have colormap by default if they
were created with a non-NULL window argument. Otherwise
a colormap must be set on them with gdk_drawable_set_colormap

I have verified that the attached patch works in 24 and 30 bit color depths with
the NVIDIA binary driver from from the Debian package nvidia-driver version
340.93-3.

Deep Color with 30-bit depth is enabled by the following /etc/X11/xorg.conf:

Section "Device"
  Identifier "Quadro K620"
  Driver "nvidia"
EndSection

Section "Screen"
  Identifier "Primary Screen"
  DefaultDepth 30
  SubSection "Display"
    Depth 30
  EndSubSection
EndSection

I have not been able to reproduce the error and test the patch with the Nouveau
driver as it doesn't support my GPU.

See [2] for API documentation about 'gdk_screen_get_rgb_colormap'.

[1] http://silb.no/xfwm4-30-bit-depth-garbled.png
[2] 
https://developer.gnome.org/gdk2/stable/GdkScreen.html#gdk-screen-get-rgb-colormap

--
Stig Inge Lea Bjørnsen


-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (1001, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.2.0-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=nb_NO.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages xfwm4 depends on:
ii  libc6                     2.19-22
ii  libcairo2                 1.14.2-2
ii  libdbus-glib-1-2          0.102-1
ii  libgdk-pixbuf2.0-0        2.32.0-1
ii  libglib2.0-0              2.46.0-2
ii  libgtk2.0-0               2.24.28-1
ii  libpango-1.0-0            1.38.0-3
ii  libstartup-notification0  0.12-4
ii  libwnck22                 2.30.7-2
ii  libx11-6                  2:1.6.3-1
ii  libxcomposite1            1:0.4.4-1
ii  libxdamage1               1:1.1.4-2+b1
ii  libxext6                  2:1.3.3-1
ii  libxfce4ui-1-0            4.12.1-2
ii  libxfce4util7             4.12.1-2
ii  libxfconf-0-2             4.12.0-2+b1
ii  libxfixes3                1:5.0.1-2+b2
ii  libxrandr2                2:1.5.0-1
ii  libxrender1               1:0.9.8-1+b1

Versions of packages xfwm4 recommends:
ii  librsvg2-common  2.40.10-1

Versions of packages xfwm4 suggests:
ii  xfce4         4.12.1
ii  xfwm4-themes  4.10.0-2

-- no debconf information
diff --git a/src/frame.c b/src/frame.c
index ec489f6..ca0d511 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -537,7 +537,7 @@ frameCreateTitlePixmap (Client * c, int state, int left, int right, xfwmPixmap *
     xfwmPixmapCreate (screen_info, top_pm, width, top_height);
     xfwmPixmapCreate (screen_info, title_pm, width, frameTop (c));
     gpixmap = gdk_pixmap_foreign_new (title_pm->pixmap);
-    gdk_drawable_set_colormap (gpixmap, gdk_screen_get_rgb_colormap (screen_info->gscr));
+    gdk_drawable_set_colormap (gpixmap, gdk_screen_get_system_colormap (screen_info->gscr));
     gc = gdk_gc_new (gpixmap);
 
     if (w1 > 0)
diff --git a/src/screen.c b/src/screen.c
index 1af60fb..d5c7266 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -201,7 +201,7 @@ myScreenInit (DisplayInfo *display_info, GdkScreen *gscr, unsigned long event_ma
     screen_info->xscreen = gdk_x11_screen_get_xscreen (gscr);
     screen_info->xroot = (Window) GDK_DRAWABLE_XID(gdk_screen_get_root_window (gscr));
     screen_info->screen = gdk_screen_get_number (gscr);
-    screen_info->cmap = GDK_COLORMAP_XCOLORMAP(gdk_screen_get_rgb_colormap (gscr));
+    screen_info->cmap = GDK_COLORMAP_XCOLORMAP(gdk_screen_get_system_colormap (gscr));
     screen_info->depth = DefaultDepth (display_info->dpy, screen_info->screen);
     screen_info->visual = DefaultVisual (display_info->dpy, screen_info->screen);
     screen_info->shape_win = (Window) None;
diff --git a/src/settings.c b/src/settings.c
index 3dac5ae..20348b0 100644
--- a/src/settings.c
+++ b/src/settings.c
@@ -250,14 +250,14 @@ setXfwmColor (ScreenInfo *screen_info, XfwmColor *color, Settings *rc, int id, c
 {
     if (color->allocated)
     {
-        gdk_colormap_free_colors (gdk_screen_get_rgb_colormap (screen_info->gscr), &color->col, 1);
+        gdk_colormap_free_colors (gdk_screen_get_system_colormap (screen_info->gscr), &color->col, 1);
         color->allocated = FALSE;
     }
 
     /** do a direct value_get_string */
     if (gdk_color_parse (g_value_get_string(rc[id].value), &color->col))
     {
-        if (gdk_colormap_alloc_color (gdk_screen_get_rgb_colormap (screen_info->gscr),
+        if (gdk_colormap_alloc_color (gdk_screen_get_system_colormap (screen_info->gscr),
                                       &color->col, FALSE, FALSE))
         {
             color->allocated = TRUE;
_______________________________________________
Pkg-xfce-devel mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-xfce-devel

Reply via email to