Round expose rectangle outwards.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@15717 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Alexander Malmberg 2003-01-26 19:09:33 +00:00
parent c1f7e90bcb
commit b3dc1b6f11
2 changed files with 15 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2003-01-26 20:07 Alexander Malmberg <alexander@malmberg.org>
* Source/x11/XWindowBuffer.m (-_exposeRect:): Round rectangle to
expose outwards so all pixels intersected by the expose rectangle
are actually exposed.
2003-01-26 20:04 Alexander Malmberg <alexander@malmberg.org>
* Headers/xlib/XGPrivate.h, Source/art/ARTContext.m,

View file

@ -27,6 +27,7 @@
#include "x11/XWindowBuffer.h"
#include <math.h>
#include <sys/ipc.h>
#include <sys/shm.h>
@ -318,12 +319,20 @@ rects in the new size before we are updated.
For now, we just intersect with our known size to avoid problems with X.
*/
NSRect r2;
r = NSIntersectionRect(r, NSMakeRect(0, 0,
window->xframe.size.width, window->xframe.size.height));
if (NSIsEmptyRect(r))
return;
r2.origin.x=floor(r.origin.x);
r2.origin.y=floor(r.origin.y);
r2.size.width=ceil(r.size.width+r.origin.x-r2.origin.x);
r2.size.height=ceil(r.size.height+r.origin.y-r2.origin.y);
r=r2;
if (use_shm)
{