mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 18:20:36 +00:00
Minor bug fixes related to lock/unlock of focus and
displaying cells when their value has changed. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@2257 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
bec518f970
commit
fe5dc912f5
5 changed files with 43 additions and 53 deletions
|
@ -99,14 +99,17 @@ NSString *NSViewFocusChangedNotification = @"NSViewFocusChangedNotification";
|
|||
+ (NSView *)popFocusView
|
||||
{
|
||||
NSThread *current_thread = [NSThread currentThread];
|
||||
id v;
|
||||
|
||||
// Obtain lock so we can edit the dictionary
|
||||
[gnustep_gui_nsview_lock lock];
|
||||
|
||||
// Remove from dictionary
|
||||
v = [gnustep_gui_nsview_thread_dict objectForKey: current_thread];
|
||||
[gnustep_gui_nsview_thread_dict removeObjectForKey: current_thread];
|
||||
|
||||
[gnustep_gui_nsview_lock unlock];
|
||||
return v;
|
||||
}
|
||||
|
||||
+ (NSView *)focusView
|
||||
|
@ -789,13 +792,13 @@ NSString *NSViewFocusChangedNotification = @"NSViewFocusChangedNotification";
|
|||
|
||||
[self lockFocus];
|
||||
[self drawRect:bounds];
|
||||
[self unlockFocus];
|
||||
|
||||
// Tell subviews to display
|
||||
j = [sub_views count];
|
||||
for (i = 0;i < j; ++i)
|
||||
[(NSView *)[sub_views objectAtIndex:i] display];
|
||||
[[self window] flushWindow];
|
||||
[self unlockFocus];
|
||||
}
|
||||
|
||||
- (void)displayIfNeeded
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue