[Xfce4-commits] [xfce/xfwm4] 01/02: Fix rendering with 30-bit colormap

noreply at xfce.org noreply at xfce.org
Wed Feb 24 11:42:53 CET 2016


This is an automated email from the git hooks/post-receive script.

olivier pushed a commit to branch xfce-4.12
in repository xfce/xfwm4.

commit 7bddfab7db53d6f45d51525b6adfa5c883cfa8c0
Author: Stig Inge Lea Bjørnsen <stiginge at pvv.org>
Date:   Sun Oct 4 16:27:05 2015 +0200

    Fix rendering with 30-bit colormap
    
    Bug: 12344
    
    Use gdk_screen_get_system_colormap() instead of
    gdk_screen_get_rgb_colormap() which returns NULL on a 30-bit screen and
    therefore breaks further rendering.
    
    Originally reported in Debian bug #800883 where this patch was
    attached.
---
 src/frame.c    | 2 +-
 src/screen.c   | 2 +-
 src/settings.c | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

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 289915a..ffc4f87 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;

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list