diff options
-rw-r--r-- | recordmydesktop/include/rmdtypes.h | 1 | ||||
-rw-r--r-- | recordmydesktop/src/get_frame.c | 15 | ||||
-rw-r--r-- | recordmydesktop/src/poll_events.c | 15 |
3 files changed, 21 insertions, 10 deletions
diff --git a/recordmydesktop/include/rmdtypes.h b/recordmydesktop/include/rmdtypes.h index b84a148..317e8c5 100644 --- a/recordmydesktop/include/rmdtypes.h +++ b/recordmydesktop/include/rmdtypes.h @@ -321,6 +321,7 @@ typedef struct _ProgData{ unsigned int periodtime,//time that a sound buffer lasts (microsecs) frametime; //time that a frame lasts (microsecs) char *window_manager; //name of the window manager at program launch + Window shaped_w; //frame int list_selector, //selector for the rect_roots damage_event, //damage event base code damage_error, //damage error base code diff --git a/recordmydesktop/src/get_frame.c b/recordmydesktop/src/get_frame.c index b0f9383..fefb6be 100644 --- a/recordmydesktop/src/get_frame.c +++ b/recordmydesktop/src/get_frame.c @@ -135,8 +135,7 @@ void *GetFrame(ProgData *pdata){ WGeometry mouse_pos_abs,mouse_pos_rel,mouse_pos_temp; BRWindow temp_brwin; Window root_ret, - child_ret, - shaped_w=None; //Frame + child_ret; //Frame XFixesCursorImage *xcim=NULL; XImage *image=NULL,*image_back=NULL; //the image that holds //the current full screenshot @@ -186,13 +185,14 @@ void *GetFrame(ProgData *pdata){ } if(!pdata->args.noframe){ - shaped_w=rmdFrameInit(pdata->dpy, + pdata->shaped_w=rmdFrameInit(pdata->dpy, pdata->specs.screen, pdata->specs.root, pdata->brwin.rgeom.x, pdata->brwin.rgeom.y, pdata->brwin.rgeom.width, pdata->brwin.rgeom.height); + XSelectInput(pdata->dpy,pdata->shaped_w,ExposureMask); } mouse_pos_abs.x=mouse_pos_temp.x=0; @@ -270,15 +270,10 @@ void *GetFrame(ProgData *pdata){ pdata->specs.height); if(!pdata->args.noframe){ rmdMoveFrame(pdata->dpy, - shaped_w, + pdata->shaped_w, temp_brwin.rgeom.x, temp_brwin.rgeom.y); - rmdDrawFrame(pdata->dpy, - pdata->specs.screen, - shaped_w, - pdata->brwin.rgeom.width, - pdata->brwin.rgeom.height); } } @@ -425,7 +420,7 @@ void *GetFrame(ProgData *pdata){ } if(!pdata->args.noframe){ - XDestroyWindow(pdata->dpy,shaped_w); + XDestroyWindow(pdata->dpy,pdata->shaped_w); } diff --git a/recordmydesktop/src/poll_events.c b/recordmydesktop/src/poll_events.c index e78587e..4ddcfae 100644 --- a/recordmydesktop/src/poll_events.c +++ b/recordmydesktop/src/poll_events.c @@ -52,6 +52,7 @@ void *PollEvents(ProgData *pdata){ XSelectInput (pdata->dpy,pdata->specs.root, SubstructureNotifyMask); + if(!pdata->args.full_shots){ XQueryTree (pdata->dpy, pdata->specs.root, @@ -110,6 +111,20 @@ void *PollEvents(ProgData *pdata){ } } } + else if(event.type == Expose){ + + if(event.xexpose.count!=0) + continue; + else if(!pdata->args.noframe){ + rmdDrawFrame(pdata->dpy, + pdata->specs.screen, + pdata->shaped_w, + pdata->brwin.rgeom.width, + pdata->brwin.rgeom.height); + + } + + } else if(!pdata->args.full_shots){ if(event.type == MapNotify ){ XWindowAttributes attribs; |