diff options
author | Stig Inge Lea Bjørnsen <stiginge@pvv.org> | 2015-10-04 16:27:05 +0200 |
---|---|---|
committer | Olivier Fourdan <fourdan@xfce.org> | 2016-02-24 11:42:32 +0100 |
commit | 7bddfab7db53d6f45d51525b6adfa5c883cfa8c0 (patch) | |
tree | 4bf2ea98fa781c18f70d7599a6a7d94aeafdb8b9 | |
parent | 612f264967477186451300b987349c08f5edb419 (diff) | |
download | xfwm4-7bddfab7db53d6f45d51525b6adfa5c883cfa8c0.tar.gz |
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.
-rw-r--r-- | src/frame.c | 2 | ||||
-rw-r--r-- | src/screen.c | 2 | ||||
-rw-r--r-- | src/settings.c | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/frame.c b/src/frame.c index ec489f6d3..ca0d51158 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 289915adc..ffc4f87da 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 3dac5aeed..20348b085 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; |