summaryrefslogtreecommitdiff
path: root/recordmydesktop/src/rmd.c
diff options
context:
space:
mode:
authoriovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a>2008-11-15 16:28:36 +0000
committeriovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a>2008-11-15 16:28:36 +0000
commitf54124e18ec18c7a97db7221e2a2ba23313e5ff4 (patch)
treedd9e09f09169eae937ac22c15894c47b5fba8745 /recordmydesktop/src/rmd.c
parente8464a74616b7ccd1269d09a0be4bb9244b05ea8 (diff)
src/rmd_wm_is_compositing.[ch], src/rmd.c, src/rmd_types.h, src/Makefile.am :
Added rmdWMIsCompositing method which is used to determine if the window manager is compositing and thus if it will be recorded in --full-shots mode. This method replaces the name check that was previously used, but rmdWMCheck hasn't been removed as it is also a proper method of identifying compliance with the freedesktop.org standards, which is a neccessary step before determining whether a window manager is compositing. This method is still not perfect as non-3d compositing WM's will trigger full-shots, without neccessarily needing it, but the only penalty for this mistake will be increased CPU usage while previously, non-identification of compositing WM as such could lead in distorted/unusable videos (e.g. KWin when used in 3d compositing mode). git-svn-id: https://recordmydesktop.svn.sourceforge.net/svnroot/recordmydesktop/trunk@568 f606c939-3180-4ac9-a4b8-4b8779d57d0a
Diffstat (limited to 'recordmydesktop/src/rmd.c')
-rw-r--r--recordmydesktop/src/rmd.c23
1 files changed, 6 insertions, 17 deletions
diff --git a/recordmydesktop/src/rmd.c b/recordmydesktop/src/rmd.c
index 6c3edfa..c88a4c4 100644
--- a/recordmydesktop/src/rmd.c
+++ b/recordmydesktop/src/rmd.c
@@ -38,7 +38,7 @@
#include "rmd_setbrwindow.h"
#include "rmd_shortcuts.h"
#include "rmd_threads.h"
-#include "rmd_wm_check.h"
+#include "rmd_wm_is_compositing.h"
int main(int argc,char **argv){
@@ -99,28 +99,17 @@ int main(int argc,char **argv){
if (!SetBRWindow(pdata.dpy, &pdata.brwin, &pdata.specs, &pdata.args))
exit(11);
- //check if we are under compiz or beryl,
- //in which case we must enable full-shots
- //and with it use of shared memory.User can override this
- pdata.window_manager=((pdata.args.nowmcheck)?
- NULL:rmdWMCheck(pdata.dpy,pdata.specs.root));
- if(pdata.window_manager==NULL){
- fprintf(stderr,"Not taking window manager into account.\n");
- }
- //Right now only wm's that I know of performing
- //3d compositing are beryl and compiz.
- //No, the blue screen in metacity doesn't count :)
- //names can be compiz for compiz and beryl/beryl-co/beryl-core
- //for beryl(so it's strncmp )
- else if(!strcmp(pdata.window_manager,"compiz") ||
- !strncmp(pdata.window_manager,"beryl",5)){
- fprintf(stderr,"\nDetected 3d compositing window manager.\n"
+ if( !pdata.args.nowmcheck &&
+ rmdWMIsCompositing( pdata.dpy, pdata.specs.screen ) ) {
+
+ fprintf(stderr,"\nDetected compositing window manager.\n"
"Reverting to full screen capture at every frame.\n"
"To disable this check run with --no-wm-check\n"
"(though that is not advised, since it will "
"probably produce faulty results).\n\n");
pdata.args.full_shots=1;
pdata.args.noshared=0;
+
}
QueryExtensions(pdata.dpy,
© All Rights Reserved