[gnome-shell] shell-recorder: Disable unredirection while recording



commit 1b3c89f32b35528cb6cb93f40ec4a04984d49a36
Author: Adel Gadllah <adel gadllah gmail com>
Date:   Thu Oct 9 14:42:06 2014 +0200

    shell-recorder: Disable unredirection while recording
    
    This is required to be able to record windows that would
    otherwise be unredirected.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=738226

 src/shell-recorder.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/shell-recorder.c b/src/shell-recorder.c
index abf403f..4690368 100644
--- a/src/shell-recorder.c
+++ b/src/shell-recorder.c
@@ -17,7 +17,9 @@
 #include <cogl/cogl.h>
 #include <meta/screen.h>
 #include <meta/meta-cursor-tracker.h>
+#include <meta/compositor-mutter.h>
 
+#include "shell-global.h"
 #include "shell-recorder-src.h"
 #include "shell-recorder.h"
 
@@ -1535,6 +1537,9 @@ shell_recorder_record (ShellRecorder  *recorder,
   recorder_update_pointer (recorder);
   recorder_add_update_pointer_timeout (recorder);
 
+  /* Disable unredirection while we are recoring */
+  meta_disable_unredirect_for_screen (shell_global_get_screen (shell_global_get ()));
+
   /* Set up repaint hook */
   recorder->repaint_hook_id = clutter_threads_add_repaint_func(recorder_repaint_hook, recorder->stage, NULL);
 
@@ -1583,6 +1588,9 @@ shell_recorder_close (ShellRecorder *recorder)
 
   recorder->state = RECORDER_STATE_CLOSED;
 
+  /* Reenable unredirection while we are recoring */
+  meta_enable_unredirect_for_screen (shell_global_get_screen (shell_global_get ()));
+
   /* Release the refcount we took when we started recording */
   g_object_unref (recorder);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]