diff options
author | enselic <enselic@f606c939-3180-4ac9-a4b8-4b8779d57d0a> | 2008-09-17 16:36:46 +0000 |
---|---|---|
committer | enselic <enselic@f606c939-3180-4ac9-a4b8-4b8779d57d0a> | 2008-09-17 16:36:46 +0000 |
commit | e3c7224674c99f7476b93fd1ada7d5c05cad6029 (patch) | |
tree | 017b3eb70003d373d5d518571a908d8237a3c989 | |
parent | 6263179e32282998844165becb5c4a6a83cf92dc (diff) |
src/rmd_get_frame.c: Make the cursor area be properly invalidated and
captured. We need to add dirtiness not only for the old cursor
position, but also for the new position. The cursor with --full-shots
is still broken however.
git-svn-id: https://recordmydesktop.svn.sourceforge.net/svnroot/recordmydesktop/trunk@557 f606c939-3180-4ac9-a4b8-4b8779d57d0a
-rw-r--r-- | recordmydesktop/src/rmd_get_frame.c | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/recordmydesktop/src/rmd_get_frame.c b/recordmydesktop/src/rmd_get_frame.c index 99ca723..12901af 100644 --- a/recordmydesktop/src/rmd_get_frame.c +++ b/recordmydesktop/src/rmd_get_frame.c @@ -462,22 +462,28 @@ void *GetFrame(ProgData *pdata){ if(pdata->args.xfixes_cursor || pdata->args.have_dummy_cursor|| pdata->args.follow_mouse){ + + + // ==Old comment== (not sure how to interpret): //pointer sequence //update previous_position //(if full_shots is enabled the new cursor is //entered on the list for update. //When taking full shots we keep it for further //bellow, to mark the area as dirty when dbuffering. - CLIP_DUMMY_POINTER_AREA(mouse_pos_abs,&temp_brwin, - &mouse_pos_temp); - if(!pdata->args.full_shots){ - if((mouse_pos_temp.x>=0)&& - (mouse_pos_temp.y>=0)&& - (mouse_pos_temp.width>0)&& - (mouse_pos_temp.height>0)) - RectInsert(&pdata->rect_root,&mouse_pos_temp); + // + // ==New comment== + // Pointer sequence: + // * Mark previous position as dirty with RectInsert() + // * Update to new position + // * Mark new position as dirty with RectInsert() + if (!pdata->args.full_shots && + mouse_pos_temp.x >=0 && + mouse_pos_temp.y >=0 && + mouse_pos_temp.width > 0 && + mouse_pos_temp.height > 0) { + RectInsert(&pdata->rect_root,&mouse_pos_temp); } - //find new one if(pdata->args.xfixes_cursor){ xcim=XFixesGetCursorImage(pdata->dpy); mouse_pos_abs.x=xcim->x-xcim->xhot; @@ -492,6 +498,14 @@ void *GetFrame(ProgData *pdata){ &mouse_pos_abs.x,&mouse_pos_abs.y, &mouse_pos_rel.x,&mouse_pos_rel.y,&msk_ret); } + CLIP_DUMMY_POINTER_AREA(mouse_pos_abs, &temp_brwin, &mouse_pos_temp); + if (!pdata->args.full_shots && + mouse_pos_temp.x >=0 && + mouse_pos_temp.y >=0 && + mouse_pos_temp.width > 0 && + mouse_pos_temp.height > 0) { + RectInsert(&pdata->rect_root,&mouse_pos_temp); + } } if(pdata->args.follow_mouse){ MoveCaptureArea(&pdata->brwin, |