[gtk+] Create the icon pixmap with the system visual
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Create the icon pixmap with the system visual
- Date: Fri, 19 Nov 2010 14:30:14 +0000 (UTC)
commit a4d59f7415968e2cd2d6bb0cff97dffaff022f2e
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Sun Nov 14 09:38:32 2010 -0500
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
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 88d8510..b369e2c 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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]