Blob Blame History Raw
diff -up mutter-3.14.4/src/backends/x11/meta-backend-x11.c.threaded-swap-wait mutter-3.14.4/src/backends/x11/meta-backend-x11.c
--- mutter-3.14.4/src/backends/x11/meta-backend-x11.c.threaded-swap-wait	2016-06-29 15:25:56.267633457 -0400
+++ mutter-3.14.4/src/backends/x11/meta-backend-x11.c	2016-06-29 15:26:35.800269586 -0400
@@ -696,6 +696,15 @@ meta_backend_x11_class_init (MetaBackend
 static void
 meta_backend_x11_init (MetaBackendX11 *x11)
 {
+  /* Set up things so that if the INTEL_swap_event extension is not present,
+   * but the driver is known to have good thread support, we use an extra
+   * thread and call glXWaitVideoSync() in the thread. This allows idles
+   * to work properly, even when Mutter is constantly redrawing new frames;
+   * otherwise, without INTEL_swap_event, we'll just block in glXSwapBuffers().
+   */
+  XInitThreads();
+  clutter_x11_enable_threaded_swap_wait ();
+
   clutter_x11_request_reset_on_video_memory_purge ();
 
   /* We do X11 event retrieval ourselves */