diff options
author | biocrasher <biocrasher@f606c939-3180-4ac9-a4b8-4b8779d57d0a> | 2006-07-14 08:59:43 +0000 |
---|---|---|
committer | biocrasher <biocrasher@f606c939-3180-4ac9-a4b8-4b8779d57d0a> | 2006-07-14 08:59:43 +0000 |
commit | d4f2abf7517f3d60ec8bf49768fe6aed4f30d764 (patch) | |
tree | 3e46dedde82979e0d73b8172e680ca16d539ef37 /recordmydesktop/src | |
parent | dad971c4a423e39a6cc6886585d25150e0d12c8f (diff) |
lines bug fixed
git-svn-id: https://recordmydesktop.svn.sourceforge.net/svnroot/recordmydesktop/trunk@5 f606c939-3180-4ac9-a4b8-4b8779d57d0a
Diffstat (limited to 'recordmydesktop/src')
-rw-r--r-- | recordmydesktop/src/rectinsert.c | 20 | ||||
-rw-r--r-- | recordmydesktop/src/setbrwindow.c | 14 |
2 files changed, 33 insertions, 1 deletions
diff --git a/recordmydesktop/src/rectinsert.c b/recordmydesktop/src/rectinsert.c index 4caf1b8..dfe721e 100644 --- a/recordmydesktop/src/rectinsert.c +++ b/recordmydesktop/src/rectinsert.c @@ -269,6 +269,16 @@ int RectInsert(RectArea **root,WGeometry *wgeom){ int total_insertions=0; RectArea *temp,*newnode=(RectArea *)malloc(sizeof(RectArea)); + //align + //we do need to know boundaries + wgeom->width+=(wgeom->width%2)|(wgeom->x%2); + wgeom->height+=(wgeom->height%2)|(wgeom->y%2); + wgeom->width+=(wgeom->width%2); + wgeom->height+=(wgeom->height%2); + wgeom->x-=wgeom->x%2; + wgeom->y-=wgeom->y%2; +// fprintf(stderr," %d %d %d %d\n",wgeom->x, + newnode->geom.x=wgeom->x; newnode->geom.y=wgeom->y; newnode->geom.width=wgeom->width; @@ -290,7 +300,15 @@ int RectInsert(RectArea **root,WGeometry *wgeom){ if((!collres)) insert_ok=1; else{ - insert_ok=0; + for(i=0;i<ngeoms;i++){ + wgeom_return[i]->width+=(wgeom_return[i]->width%2)|(wgeom_return[i]->x%2); + wgeom_return[i]->height+=(wgeom_return[i]->height%2)|(wgeom_return[i]->y%2); + wgeom_return[i]->width+=(wgeom_return[i]->width%2); + wgeom_return[i]->height+=(wgeom_return[i]->height%2); + wgeom_return[i]->x-=wgeom_return[i]->x%2; + wgeom_return[i]->y-=wgeom_return[i]->y%2; + } + insert_ok=0; switch(collres){ case 1://remove current node,reinsert new one total_insertions--; diff --git a/recordmydesktop/src/setbrwindow.c b/recordmydesktop/src/setbrwindow.c index 13e7de3..3eda7ad 100644 --- a/recordmydesktop/src/setbrwindow.c +++ b/recordmydesktop/src/setbrwindow.c @@ -79,6 +79,20 @@ int SetBRWindow(Display *dpy,BRWindow *brwin,DisplaySpecs *specs,ProgArgs *args) return 1; } } + //align in two + //an odd x can always go down and still be in recording area. + //Resolutions come in even numbers + //so if x is an odd numer, width max is an odd number, too + //thus since x will go down one then width can go up one too and still + //be inbounds + brwin->rgeom.width+=(brwin->rgeom.width%2)|(brwin->rgeom.x%2); + brwin->rgeom.height+=(brwin->rgeom.height%2)|(brwin->rgeom.y%2); + //but if x goes down 1 and width is already even,it becomes odd so: + brwin->rgeom.width+=(brwin->rgeom.width%2); + brwin->rgeom.height+=(brwin->rgeom.height%2); + brwin->rgeom.x-=brwin->rgeom.x%2; + brwin->rgeom.y-=brwin->rgeom.y%2; + //this is needed for theora //+-8 pixels brwin->rgeom.width=((((brwin->rgeom.width+16-(brwin->rgeom.width)%16+brwin->rgeom.x)<=specs->width)&&((brwin->rgeom.width)%16>8))?brwin->rgeom.width+16-(brwin->rgeom.width)%16:brwin->rgeom.width-(brwin->rgeom.width)%16); |