mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 17:01:16 +00:00
Tidied up some inefficient code that was causing window to be checked much
more often that needed. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5344 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
fc849e3129
commit
f2bcb34b09
4 changed files with 49 additions and 9 deletions
|
@ -373,7 +373,6 @@ static NSMapTable* windowmaps = NULL;
|
|||
[[wv subviews] count]);
|
||||
|
||||
[content_view setNextResponder: self];
|
||||
[content_view setNeedsDisplay: YES]; // Make sure we redraw.
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -682,6 +681,16 @@ static NSMapTable* windowmaps = NULL;
|
|||
unsigned i;
|
||||
NSWindow *w;
|
||||
|
||||
if (_rFlags.needs_display == YES)
|
||||
{
|
||||
/*
|
||||
* Don't keep trying to update the window while it is ordered out
|
||||
*/
|
||||
[[NSRunLoop currentRunLoop]
|
||||
cancelPerformSelector: @selector(_handleWindowNeedsDisplay:)
|
||||
target: self
|
||||
argument: nil];
|
||||
}
|
||||
if ([self isKeyWindow])
|
||||
{
|
||||
[self resignKeyWindow];
|
||||
|
@ -743,7 +752,25 @@ static NSMapTable* windowmaps = NULL;
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
if (_rFlags.needs_display == NO)
|
||||
{
|
||||
/*
|
||||
* Once we are ordered back in, we will want to update the window
|
||||
* whenever there is anything to do.
|
||||
*/
|
||||
[[NSRunLoop currentRunLoop]
|
||||
performSelector: @selector(_handleWindowNeedsDisplay:)
|
||||
target: self
|
||||
argument: nil
|
||||
order: 600000
|
||||
modes: [NSArray arrayWithObjects:
|
||||
NSDefaultRunLoopMode,
|
||||
NSModalPanelRunLoopMode,
|
||||
NSEventTrackingRunLoopMode, nil]];
|
||||
}
|
||||
}
|
||||
DPSorderwindow(GSCurrentContext(), place, otherWin, [self windowNumber]);
|
||||
}
|
||||
|
||||
|
@ -1108,7 +1135,7 @@ static NSMapTable* windowmaps = NULL;
|
|||
|
||||
- (void) _handleWindowNeedsDisplay: (id)bogus
|
||||
{
|
||||
[self displayIfNeeded];
|
||||
[self displayIfNeeded];
|
||||
}
|
||||
|
||||
- (void) setViewsNeedDisplay: (BOOL)flag
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue