summaryrefslogtreecommitdiff
path: root/packages/gtkhtml/gtkhtml-3.0/fix-missing-colormap.patch
blob: 6ec7409bd43672c9c27672b1c717fa8f20a41158 (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
--- gtkhtml-3.0.10/src/htmlgdkpainter.c.orig	2004-07-23 17:07:05.000000000 +0100
+++ gtkhtml-3.0.10/src/htmlgdkpainter.c	2004-07-23 17:17:09.000000000 +0100
@@ -277,22 +277,19 @@
 begin (HTMLPainter *painter, int x1, int y1, int x2, int y2)
 {
 	HTMLGdkPainter *gdk_painter;
-	GdkVisual *visual;
 
 	/* printf ("painter begin %d,%d %d,%d\n", x1, y1, x2, y2); */
 
 	gdk_painter = HTML_GDK_PAINTER (painter);
 	g_return_if_fail (gdk_painter->window != NULL);
-	visual = gdk_drawable_get_visual (gdk_painter->window);
-	g_return_if_fail (visual != NULL);
 
 	if (gdk_painter->double_buffer){
 		const int width = x2 - x1 + 1;
 		const int height = y2 - y1 + 1;
 
 		g_assert (gdk_painter->pixmap == NULL);
-		
-		gdk_painter->pixmap = gdk_pixmap_new (gdk_painter->pixmap, width, height, visual->depth);
+
+		gdk_painter->pixmap = gdk_pixmap_new (gdk_painter->window, width, height, -1);
 		gdk_painter->x1 = x1;
 		gdk_painter->y1 = y1;
 		gdk_painter->x2 = x2;
@@ -313,6 +310,8 @@
 		gdk_painter->x2 = 0;
 		gdk_painter->y2 = 0;
 	}
+
+	g_assert(gdk_drawable_get_colormap(gdk_painter->pixmap) != NULL);
 }
 
 static void