diff options
author | Owen W. Taylor <otaylor@fishsoup.net> | 2010-11-14 09:38:32 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2010-11-19 09:29:43 -0500 |
commit | a4d59f7415968e2cd2d6bb0cff97dffaff022f2e (patch) | |
tree | 23ed239a6e086aa72b1ce568b8dddb8ada73782e /gdk | |
parent | d3f1312c98db6c5994e6aee8223913fa9f361af8 (diff) | |
download | gtk+-a4d59f7415968e2cd2d6bb0cff97dffaff022f2e.tar.gz |
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
Diffstat (limited to 'gdk')
-rw-r--r-- | gdk/x11/gdkwindow-x11.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c index 88d85101ae..b369e2c63e 100644 --- a/gdk/x11/gdkwindow-x11.c +++ b/gdk/x11/gdkwindow-x11.c @@ -271,16 +271,17 @@ _gdk_x11_window_create_bitmap_surface (GdkWindow *window, return surface; } +/* Create a surface backed with a pixmap without alpha on the same screen as window */ static cairo_surface_t * gdk_x11_window_create_pixmap_surface (GdkWindow *window, int width, int height) { + GdkScreen *screen = gdk_window_get_screen (window); + GdkVisual *visual = gdk_screen_get_system_visual (screen); cairo_surface_t *surface; Pixmap pixmap; - GdkVisual *visual; - visual = gdk_window_get_visual (window); pixmap = XCreatePixmap (GDK_WINDOW_XDISPLAY (window), GDK_WINDOW_XID (window), width, height, |