[maemo-commits] [maemo-commits] r18562 - in projects/haf/trunk/clutter0.8: debian tests

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Mon Jun 1 15:38:30 EEST 2009
Author: kihamala
Date: 2009-06-01 15:38:27 +0300 (Mon, 01 Jun 2009)
New Revision: 18562

Modified:
   projects/haf/trunk/clutter0.8/debian/changelog
   projects/haf/trunk/clutter0.8/tests/test-actors.c
Log:
added support for requesting non-comp. mode from HD to test-actors


Modified: projects/haf/trunk/clutter0.8/debian/changelog
===================================================================
--- projects/haf/trunk/clutter0.8/debian/changelog	2009-06-01 10:33:02 UTC (rev 18561)
+++ projects/haf/trunk/clutter0.8/debian/changelog	2009-06-01 12:38:27 UTC (rev 18562)
@@ -1,6 +1,7 @@
 clutter (0.8.2-0maemo34~unreleased) unstable; urgency=low
 
-  * foo
+  * tests/test-actors.c: Modify to add optional code for requesting
+    non-composition support.
 
  -- Kimmo Hämäläinen <kimmo.hamalainen at nokia.com>  Mon,  1 Jun 2009 08:24:39 +0300
 

Modified: projects/haf/trunk/clutter0.8/tests/test-actors.c
===================================================================
--- projects/haf/trunk/clutter0.8/tests/test-actors.c	2009-06-01 10:33:02 UTC (rev 18561)
+++ projects/haf/trunk/clutter0.8/tests/test-actors.c	2009-06-01 12:38:27 UTC (rev 18562)
@@ -9,6 +9,14 @@
 #include <stdlib.h>
 #include <glib.h>
 
+/* Uncomment to run in hildon-desktop "non-composited mode" */
+/* #define REQ_NON_COMPOSITION 1 */
+
+#ifdef REQ_NON_COMPOSITION
+#include <X11/Xlib.h>
+#include <X11/Xatom.h>
+#endif
+
 #define TRAILS  0
 #define NHANDS  6
 #define RADIUS  ((CLUTTER_STAGE_WIDTH()+CLUTTER_STAGE_HEIGHT())/NHANDS)
@@ -140,6 +148,13 @@
   gint             i;
   GError          *error;
 
+#ifdef REQ_NON_COMPOSITION
+  Window           xwin;
+  Atom             non_comp_atom;
+  Display         *dpy;
+  int              one = 1;
+#endif
+
   error = NULL;
 
   clutter_init_with_args (&argc, &argv,
@@ -163,6 +178,19 @@
   clutter_stage_set_color (CLUTTER_STAGE (stage),
 		           &stage_color);
 
+#ifdef REQ_NON_COMPOSITION
+  /* request non-composited mode */
+  clutter_stage_fullscreen (stage);
+  xwin = clutter_x11_get_stage_window (stage);
+  dpy = XOpenDisplay(NULL);
+  non_comp_atom = XInternAtom(dpy, "_HILDON_NON_COMPOSITED_WINDOW", False);
+  XChangeProperty (dpy, xwin, non_comp_atom,
+                   XA_INTEGER, 32, PropModeReplace,
+                   (unsigned char *) &one, 1);
+  printf ("stage win is %lx\n", xwin);
+  XSync (dpy, False);
+#endif
+
   oh = g_new(SuperOH, 1);
 
   /* Create a timeline to manage animation */


More information about the maemo-commits mailing list