mirror of
https://github.com/gnustep/libs-back.git
synced 2025-05-30 08:51:03 +00:00
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:
parent
e94597a41b
commit
ae36bf80c3
2 changed files with 15 additions and 0 deletions
|
@ -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>
|
2003-01-26 20:04 Alexander Malmberg <alexander@malmberg.org>
|
||||||
|
|
||||||
* Headers/xlib/XGPrivate.h, Source/art/ARTContext.m,
|
* Headers/xlib/XGPrivate.h, Source/art/ARTContext.m,
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
|
|
||||||
#include "x11/XWindowBuffer.h"
|
#include "x11/XWindowBuffer.h"
|
||||||
|
|
||||||
|
#include <math.h>
|
||||||
#include <sys/ipc.h>
|
#include <sys/ipc.h>
|
||||||
#include <sys/shm.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.
|
For now, we just intersect with our known size to avoid problems with X.
|
||||||
*/
|
*/
|
||||||
|
NSRect r2;
|
||||||
|
|
||||||
r = NSIntersectionRect(r, NSMakeRect(0, 0,
|
r = NSIntersectionRect(r, NSMakeRect(0, 0,
|
||||||
window->xframe.size.width, window->xframe.size.height));
|
window->xframe.size.width, window->xframe.size.height));
|
||||||
if (NSIsEmptyRect(r))
|
if (NSIsEmptyRect(r))
|
||||||
return;
|
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)
|
if (use_shm)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue