[maemo-commits] [maemo-commits] r18890 - in projects/haf/trunk/gtk+: . gdk

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Mon Jul 20 16:50:25 EEST 2009
Author: herzi
Date: 2009-07-20 16:50:08 +0300 (Mon, 20 Jul 2009)
New Revision: 18890

Modified:
   projects/haf/trunk/gtk+/ChangeLog
   projects/haf/trunk/gtk+/gdk/gdkwindow.c
Log:
2009-03-24  Sven Herzberg  <herzi at lanedo.com>

	Added Tim's rendering approach, too

	* gdk/gdkwindow.c (gdk_window_end_paint): also added the rendering
	approach that Tim wants to have



Modified: projects/haf/trunk/gtk+/ChangeLog
===================================================================
--- projects/haf/trunk/gtk+/ChangeLog	2009-07-20 13:50:04 UTC (rev 18889)
+++ projects/haf/trunk/gtk+/ChangeLog	2009-07-20 13:50:08 UTC (rev 18890)
@@ -1,3 +1,10 @@
+2009-03-24  Sven Herzberg  <herzi at lanedo.com>
+
+	Added Tim's rendering approach, too
+
+	* gdk/gdkwindow.c (gdk_window_end_paint): also added the rendering
+	approach that Tim wants to have
+
 2009-01-14  Sven Herzberg  <sven at imendio.com>
 
 	Fixes: NB#89864 - RGBA support

Modified: projects/haf/trunk/gtk+/gdk/gdkwindow.c
===================================================================
--- projects/haf/trunk/gtk+/gdk/gdkwindow.c	2009-07-20 13:50:04 UTC (rev 18889)
+++ projects/haf/trunk/gtk+/gdk/gdkwindow.c	2009-07-20 13:50:08 UTC (rev 18890)
@@ -1274,6 +1274,8 @@
     }
 
 #ifdef MAEMO_CHANGES
+#if 1
+  /* this is the code that works */
   cr = gdk_cairo_create (window);
   for (subwindow = gdk_window_peek_children (window);
        subwindow;
@@ -1295,7 +1297,22 @@
       cairo_restore (cr);
     }
   cairo_destroy (cr);
+#else
+  /* and this is the code that should be working according to timj */
+  if (gdk_window_get_auto_composite (window))
+    {
+      int x, y, w, h;
+
+      cr = gdk_cairo_create (gdk_window_get_parent (window));
+      gdk_window_get_position (window, &x, &y);
+      gdk_window_get_size     (window, &w, &h);
+      gdk_cairo_set_source_pixmap (cr, window, x, y);
+      cairo_rectangle (cr, x, y, w, h);
+      cairo_fill (cr);
+      cairo_destroy (cr);
+    }
 #endif
+#endif
 
   /* Reset clip region of the cached GdkGC */
   gdk_gc_set_clip_region (tmp_gc, NULL);

More information about the maemo-commits mailing list