blob: 676181f669586f8ac4ebece7ad97352c0a977d29 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
From: Christopher Williams <crdlb@compiz-fusion.org>
Date: Wed, 11 Feb 2009 08:23:11 +0000 (+0100)
Subject: Fix compatibility with newer libmetacity-private versions. GtkStyle is colormap speci...
X-Git-Url: http://gitweb.compiz-fusion.org/?p=compiz%2Fcore;a=commitdiff_plain;h=27cc9c5178921ce6d6266f4b00303913163be7ee
Fix compatibility with newer libmetacity-private versions. GtkStyle is colormap specific, so we can't use a new colormap each time we create a pixmap.
---
diff --git a/gtk/window-decorator/gtk-window-decorator.c b/gtk/window-decorator/gtk-window-decorator.c
index dd7ee68..91f676c 100644
--- a/gtk/window-decorator/gtk-window-decorator.c
+++ b/gtk/window-decorator/gtk-window-decorator.c
@@ -673,32 +673,10 @@ static GdkPixmap *
create_pixmap (int w,
int h)
{
- GdkPixmap *pixmap;
- GdkVisual *visual;
- GdkColormap *colormap;
-
- visual = gdk_visual_get_best_with_depth (32);
- if (!visual)
- return NULL;
-
if (w == 0 || h ==0)
abort ();
- pixmap = gdk_pixmap_new (NULL, w, h, 32);
- if (!pixmap)
- return NULL;
-
- colormap = gdk_colormap_new (visual, FALSE);
- if (!colormap)
- {
- g_object_unref (G_OBJECT (pixmap));
- return NULL;
- }
-
- gdk_drawable_set_colormap (GDK_DRAWABLE (pixmap), colormap);
- g_object_unref (G_OBJECT (colormap));
-
- return pixmap;
+ return gdk_pixmap_new (GDK_DRAWABLE (style_window->window), w, h, 32);
}
#define CORNER_TOPLEFT (1 << 0)
|