mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-21 10:51:12 +00:00
Move disable/enable flush code
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16053 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
735e3bed5e
commit
054a27b9ba
3 changed files with 15 additions and 10 deletions
|
@ -1828,6 +1828,7 @@ GSSetDragTypes(NSView* obj, NSArray *types)
|
|||
NSRect neededRect;
|
||||
NSRect redrawRect;
|
||||
|
||||
[_window disableFlushWindow];
|
||||
if (_coordinates_valid == NO)
|
||||
{
|
||||
[self _rebuildCoordinates];
|
||||
|
@ -1919,7 +1920,8 @@ GSSetDragTypes(NSView* obj, NSArray *types)
|
|||
{
|
||||
_rFlags.needs_display = NO;
|
||||
}
|
||||
[_window flushWindow];
|
||||
[_window enableFlushWindow];
|
||||
[_window flushWindowIfNeeded];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1952,6 +1954,8 @@ GSSetDragTypes(NSView* obj, NSArray *types)
|
|||
{
|
||||
return;
|
||||
}
|
||||
|
||||
[_window disableFlushWindow];
|
||||
if (_coordinates_valid == NO)
|
||||
{
|
||||
[self _rebuildCoordinates];
|
||||
|
@ -2045,7 +2049,8 @@ GSSetDragTypes(NSView* obj, NSArray *types)
|
|||
{
|
||||
_rFlags.needs_display = NO;
|
||||
}
|
||||
[_window flushWindow];
|
||||
[_window enableFlushWindow];
|
||||
[_window flushWindowIfNeeded];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1806,10 +1806,7 @@ static NSNotificationCenter *nc = nil;
|
|||
*/
|
||||
[_firstResponder becomeFirstResponder];
|
||||
|
||||
[self disableFlushWindow];
|
||||
[_wv display];
|
||||
[self enableFlushWindow];
|
||||
[self flushWindowIfNeeded];
|
||||
[self discardCachedImage];
|
||||
}
|
||||
|
||||
|
@ -1829,12 +1826,8 @@ static NSNotificationCenter *nc = nil;
|
|||
*/
|
||||
if (_f.is_autodisplay && _rFlags.needs_display)
|
||||
{
|
||||
[self disableFlushWindow];
|
||||
[self displayIfNeeded];
|
||||
[self enableFlushWindow];
|
||||
[self flushWindowIfNeeded];
|
||||
}
|
||||
[GSCurrentContext() flushGraphics];
|
||||
[nc postNotificationName: NSWindowDidUpdateNotification object: self];
|
||||
}
|
||||
|
||||
|
@ -1842,7 +1835,6 @@ static NSNotificationCenter *nc = nil;
|
|||
{
|
||||
if (_disableFlushWindow == 0 && _f.needs_flush == YES)
|
||||
{
|
||||
_f.needs_flush = NO;
|
||||
[self flushWindow];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue