Commit a4d59f74 authored by Owen W. Taylor's avatar Owen W. Taylor Committed by Matthias Clasen

Create the icon pixmap with the system visual

Since what we are doing is turning an icon with alpha into a
no-alpha icon + mask for legacy window managers, it makes more sense
to use the system visual than the window's visual, which might
be ARGB.

https://bugzilla.gnome.org/show_bug.cgi?id=634821
parent d3f1312c
...@@ -271,16 +271,17 @@ _gdk_x11_window_create_bitmap_surface (GdkWindow *window, ...@@ -271,16 +271,17 @@ _gdk_x11_window_create_bitmap_surface (GdkWindow *window,
return surface; return surface;
} }
/* Create a surface backed with a pixmap without alpha on the same screen as window */
static cairo_surface_t * static cairo_surface_t *
gdk_x11_window_create_pixmap_surface (GdkWindow *window, gdk_x11_window_create_pixmap_surface (GdkWindow *window,
int width, int width,
int height) int height)
{ {
GdkScreen *screen = gdk_window_get_screen (window);
GdkVisual *visual = gdk_screen_get_system_visual (screen);
cairo_surface_t *surface; cairo_surface_t *surface;
Pixmap pixmap; Pixmap pixmap;
GdkVisual *visual;
visual = gdk_window_get_visual (window);
pixmap = XCreatePixmap (GDK_WINDOW_XDISPLAY (window), pixmap = XCreatePixmap (GDK_WINDOW_XDISPLAY (window),
GDK_WINDOW_XID (window), GDK_WINDOW_XID (window),
width, height, width, height,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment