mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-25 09:21:53 +00:00
Updated and simplified code for the fact we no longer flush the window
in NSHighlightRect() git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@13680 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
3b8bc8cd5e
commit
68a815cb1b
1 changed files with 7 additions and 44 deletions
|
@ -347,13 +347,7 @@
|
|||
|| (NSMaxY(r) < NSMinY(oldRect)))
|
||||
// the two rects don't intersect
|
||||
{
|
||||
DPScompositerect(GSCurrentContext(),
|
||||
NSMinX(oldRect),
|
||||
NSMinY(oldRect),
|
||||
NSWidth(oldRect),
|
||||
NSHeight(oldRect),
|
||||
NSCompositeHighlight);
|
||||
// NSHighlightRect(oldRect);
|
||||
NSHighlightRect(oldRect);
|
||||
NSHighlightRect(r);
|
||||
}
|
||||
else
|
||||
|
@ -375,14 +369,7 @@
|
|||
onRect.size.height =
|
||||
NSMaxY(r) - NSMaxY(oldRect);
|
||||
|
||||
// NSHighlightRect(onRect);
|
||||
DPScompositerect(GSCurrentContext(),
|
||||
NSMinX(onRect),
|
||||
NSMinY(onRect),
|
||||
NSWidth(onRect),
|
||||
NSHeight(onRect),
|
||||
NSCompositeHighlight);
|
||||
|
||||
NSHighlightRect(onRect);
|
||||
NSHighlightRect(offRect);
|
||||
|
||||
//NSLog(@"on : %@", NSStringFromRect(onRect));
|
||||
|
@ -406,14 +393,7 @@
|
|||
onRect.size.height =
|
||||
NSMinY(oldRect) - NSMinY(r);
|
||||
|
||||
// NSHighlightRect(onRect);
|
||||
DPScompositerect(GSCurrentContext(),
|
||||
NSMinX(onRect),
|
||||
NSMinY(onRect),
|
||||
NSWidth(onRect),
|
||||
NSHeight(onRect),
|
||||
NSCompositeHighlight);
|
||||
|
||||
NSHighlightRect(onRect);
|
||||
NSHighlightRect(offRect);
|
||||
|
||||
//NSLog(@"on : %@", NSStringFromRect(onRect));
|
||||
|
@ -429,12 +409,7 @@
|
|||
|| (NSMaxX(r) < NSMinX(oldRect)))
|
||||
// the two rects don't intersect
|
||||
{
|
||||
DPScompositerect(GSCurrentContext(),
|
||||
NSMinX(oldRect),
|
||||
NSMinY(oldRect),
|
||||
NSWidth(oldRect),
|
||||
NSHeight(oldRect),
|
||||
NSCompositeHighlight);
|
||||
NSHighlightRect (oldRect);
|
||||
NSHighlightRect(r);
|
||||
}
|
||||
else
|
||||
|
@ -456,13 +431,7 @@
|
|||
onRect.size.width =
|
||||
NSMaxX(r) - NSMaxX(oldRect);
|
||||
|
||||
DPScompositerect(GSCurrentContext(),
|
||||
NSMinX(onRect),
|
||||
NSMinY(onRect),
|
||||
NSWidth(onRect),
|
||||
NSHeight(onRect),
|
||||
NSCompositeHighlight);
|
||||
// NSHighlightRect(onRect);
|
||||
NSHighlightRect(onRect);
|
||||
NSHighlightRect(offRect);
|
||||
}
|
||||
else
|
||||
|
@ -481,14 +450,7 @@
|
|||
onRect.size.width =
|
||||
NSMinX(oldRect) - NSMinX(r);
|
||||
|
||||
DPScompositerect(GSCurrentContext(),
|
||||
NSMinX(onRect),
|
||||
NSMinY(onRect),
|
||||
NSWidth(onRect),
|
||||
NSHeight(onRect),
|
||||
NSCompositeHighlight);
|
||||
|
||||
// NSHighlightRect(onRect);
|
||||
NSHighlightRect(onRect);
|
||||
NSHighlightRect(offRect);
|
||||
}
|
||||
}
|
||||
|
@ -499,6 +461,7 @@
|
|||
{
|
||||
NSHighlightRect(r);
|
||||
}
|
||||
[_window flushWindow];
|
||||
/*
|
||||
if (lit == YES)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue