mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-25 02:41:01 +00:00
When exposing a window ensure that the rectangle is drawn to (if necessary)
before flushing the buffer. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@23603 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
19870a4c7a
commit
3b65b34a1b
1 changed files with 24 additions and 5 deletions
|
@ -3371,12 +3371,31 @@ resetCursorRectsForView(NSView *theView)
|
|||
{
|
||||
case NSBackingStoreBuffered:
|
||||
case NSBackingStoreRetained:
|
||||
/* The window is buffered/retained, so we expect the
|
||||
* backend to have a copy of the region contents and
|
||||
* be able to draw it.
|
||||
/*
|
||||
* The backend may have the region buffered ...
|
||||
* so we add it to the rectangle to be flushed
|
||||
* and set the flag to say that a flush is required.
|
||||
*/
|
||||
[GSServerForWindow(self) flushwindowrect: region
|
||||
: _windowNum];
|
||||
_rectNeedingFlush
|
||||
= NSUnionRect(_rectNeedingFlush, region);
|
||||
_f.needs_flush = YES;
|
||||
if (_rFlags.needs_display)
|
||||
{
|
||||
/* Some or all of the window has not been drawn,
|
||||
* so we must at least make sure that the exposed
|
||||
* region gets drawn before its backing store is
|
||||
* flushed ... otherwise we might actually flush
|
||||
* bogus data from an out of date buffer.
|
||||
* Maybe we should call
|
||||
* [_wv displayIfNeededInRect: region]
|
||||
* but why not do all drawing at this point so
|
||||
* that if we get another expose event immediately
|
||||
* (eg. something is dragged over the window and
|
||||
* we get a series of expose events) we can just
|
||||
* flush without having to draw again.
|
||||
*/
|
||||
[_wv displayIfNeeded];
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
Loading…
Reference in a new issue