diff options
-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, |