[maemo-commits] [maemo-commits] r19207 - in projects/haf/branches/clutter: . bug.134557/clutter/x11
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Wed Aug 26 16:22:07 EEST 2009
- Previous message: [maemo-commits] r19206 - in projects/haf/branches/libmatchbox2: . bug.134557/matchbox/core
- Next message: [maemo-commits] r19208 - projects/haf/branches/clutter
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: aendrodi Date: 2009-08-26 16:22:00 +0300 (Wed, 26 Aug 2009) New Revision: 19207 Added: projects/haf/branches/clutter/bug.134557/ Modified: projects/haf/branches/clutter/bug.134557/clutter/x11/clutter-event-x11.c Log: branch for bug 134557 Copied: projects/haf/branches/clutter/bug.134557 (from rev 19205, projects/haf/trunk/clutter0.8) Modified: projects/haf/branches/clutter/bug.134557/clutter/x11/clutter-event-x11.c =================================================================== --- projects/haf/trunk/clutter0.8/clutter/x11/clutter-event-x11.c 2009-08-26 09:28:19 UTC (rev 19205) +++ projects/haf/branches/clutter/bug.134557/clutter/x11/clutter-event-x11.c 2009-08-26 13:22:00 UTC (rev 19207) @@ -816,13 +816,19 @@ Display *xdisplay = backend_x11->xdpy; XEvent xevent; ClutterMainContext *clutter_context; + struct timeval now; + static GTimer *timer; clutter_context = clutter_context_get_default (); + if (!timer) + timer = g_timer_new (); + g_timer_start (timer); while (!clutter_events_pending () && XPending (xdisplay)) { XNextEvent (xdisplay, &xevent); + gettimeofday(&now, NULL); event = clutter_event_new (CLUTTER_NOTHING); if (event_translate (backend, event, &xevent)) @@ -834,6 +840,9 @@ { clutter_event_free (event); } + + if (g_timer_elapsed (timer, NULL) >= 0.04) + break; } } @@ -887,6 +896,7 @@ return CLUTTER_X11_FILTER_CONTINUE; } +int events_blocked; static gboolean clutter_event_prepare (GSource *source, gint *timeout) @@ -897,6 +907,8 @@ clutter_threads_enter (); *timeout = -1; + if (events_blocked) + return FALSE; retval = (clutter_events_pending () || check_xpending (backend)); clutter_threads_leave ();
- Previous message: [maemo-commits] r19206 - in projects/haf/branches/libmatchbox2: . bug.134557/matchbox/core
- Next message: [maemo-commits] r19208 - projects/haf/branches/clutter
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]