diff options
author | iovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a> | 2006-11-03 05:40:38 +0000 |
---|---|---|
committer | iovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a> | 2006-11-03 05:40:38 +0000 |
commit | a897a69ee03e5aeabbf3e9ecd3dca9a0b7596166 (patch) | |
tree | 5f3f5450c68294ea4393aab56142570995055e47 /rMD-exp/src | |
parent | 66c88a4b01dea729130cc32328484e1bb2b2019e (diff) |
no wm present case
git-svn-id: https://recordmydesktop.svn.sourceforge.net/svnroot/recordmydesktop/trunk@138 f606c939-3180-4ac9-a4b8-4b8779d57d0a
Diffstat (limited to 'rMD-exp/src')
-rw-r--r-- | rMD-exp/src/wm_check.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/rMD-exp/src/wm_check.c b/rMD-exp/src/wm_check.c index f67666c..2baa105 100644 --- a/rMD-exp/src/wm_check.c +++ b/rMD-exp/src/wm_check.c @@ -46,19 +46,20 @@ char *rmdWMCheck(Display *dpy,Window root){ nwm_atom =XInternAtom(dpy,"_NET_SUPPORTING_WM_CHECK",True); wm_name_atom =XInternAtom(dpy,"_NET_WM_NAME",True); - if(!((XGetWindowProperty( dpy,root,nwm_atom,0,100, - False,XA_WINDOW, - &rt,&fmt,&nitems, &nbytes, - (unsigned char **)((void*)&wm_child)) - ==Success ) && - (XGetWindowProperty( dpy,*wm_child,wm_name_atom,0,100, - False,utf8_string,&rt, - &fmt,&nitems, &nbytes, - (unsigned char **)((void*)&wm_name_str)) - ==Success ))){ - fprintf(stderr,"Warning!!!\nYour window manager appears to be non-compliant!\n"); + if(nwm_atom!=None && wm_name_atom!=None){ + if(!((XGetWindowProperty( dpy,root,nwm_atom,0,100, + False,XA_WINDOW, + &rt,&fmt,&nitems, &nbytes, + (unsigned char **)((void*)&wm_child)) + ==Success ) && + (XGetWindowProperty( dpy,*wm_child,wm_name_atom,0,100, + False,utf8_string,&rt, + &fmt,&nitems, &nbytes, + (unsigned char **)((void*)&wm_name_str)) + ==Success ))){ + fprintf(stderr,"Warning!!!\nYour window manager appears to be non-compliant!\n"); + } } - fprintf(stderr,"Your window manager appears to be %s\n\n", ((wm_name_str!=NULL)?wm_name_str:"Uknown")); |