summaryrefslogtreecommitdiff
path: root/recordmydesktop
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2020-06-19 11:53:34 -0700
committerVito Caputo <vcaputo@pengaru.com>2020-06-20 15:58:54 -0700
commitb8bc8eaf02d19b5739df3797100b4b5d12d8fbbc (patch)
treeeb1fd8c139ab517aa51d64c8054738634d12e917 /recordmydesktop
parent2dcdb952db5b34869e5d4c2e9b216025fa910efe (diff)
get_frame: simplify rmdBRWinCpy
There's no need to copy all the members of the nested rects, just copy the whole structs.
Diffstat (limited to 'recordmydesktop')
-rw-r--r--recordmydesktop/src/rmd_get_frame.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/recordmydesktop/src/rmd_get_frame.c b/recordmydesktop/src/rmd_get_frame.c
index a75fb8e..b05177c 100644
--- a/recordmydesktop/src/rmd_get_frame.c
+++ b/recordmydesktop/src/rmd_get_frame.c
@@ -268,18 +268,10 @@ static int rmdFirstFrame(ProgData *pdata, XImage **image, XShmSegmentInfo *shmin
//make a deep copy
static void rmdBRWinCpy(BRWindow *target, BRWindow *source) {
-
- target->winrect.x=source->winrect.x;
- target->winrect.y=source->winrect.y;
- target->winrect.width=source->winrect.width;
- target->winrect.height=source->winrect.height;
- target->rrect.x=source->rrect.x;
- target->rrect.y=source->rrect.y;
- target->rrect.width=source->rrect.width;
- target->rrect.height=source->rrect.height;
- target->nbytes=source->nbytes;
- target->windowid=source->windowid;
-
+ target->winrect = source->winrect;
+ target->rrect = source->rrect;
+ target->nbytes = source->nbytes;
+ target->windowid = source->windowid;
}
//recenters the capture area to the mouse
@@ -441,7 +433,7 @@ void *rmdGetFrame(ProgData *pdata) {
pdata->capture_busy = TRUE;
- rmdBRWinCpy(&temp_brwin,&pdata->brwin);
+ rmdBRWinCpy(&temp_brwin, &pdata->brwin);
if ( pdata->args.xfixes_cursor ||
© All Rights Reserved