mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 07:10:47 +00:00
Applied a fix/workaround to an issue where a toolbar would cease from validating itself after its window was closed and re-opened.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@37068 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
a9e4f72f54
commit
624a62d838
4 changed files with 51 additions and 0 deletions
|
@ -1571,6 +1571,7 @@ titleWithRepresentedFilename(NSString *representedFilename)
|
|||
|
||||
[_wv setInputState: GSTitleBarKey];
|
||||
[GSServerForWindow(self) setinputfocus: _windowNum];
|
||||
[self _resetToolbarUpdates];
|
||||
[self resetCursorRects];
|
||||
[nc postNotificationName: NSWindowDidBecomeKeyNotification object: self];
|
||||
NSDebugLLog(@"NSWindow", @"%@ is now key window", [self title]);
|
||||
|
@ -5780,6 +5781,28 @@ current key view.<br />
|
|||
}
|
||||
@end
|
||||
|
||||
@implementation NSWindow (ToolbarPrivate)
|
||||
|
||||
- (void) _resetToolbarUpdates
|
||||
{
|
||||
/* 2013-09-11 Frank LeGrand: The toolbar validation process is
|
||||
* architectured around the GSValidationCenter and its validation
|
||||
* objects, which remove notification observers when the window
|
||||
* closes (see NSToolbar.m). This architecture seems to assume
|
||||
* that when a window closes it will be dealloc'd soon after, this
|
||||
* is incorrect as someone else maybe retaining the window and later
|
||||
* show it again. The purpose of this patch is to "turn on" again
|
||||
* the validation process of the toolbar.
|
||||
*/
|
||||
if ([self toolbar])
|
||||
{
|
||||
[[self toolbar] _resetToolbarUpdates:self];
|
||||
[nc postNotificationName: NSWindowDidUpdateNotification object: self];
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
BOOL GSViewAcceptsDrag(NSView *v, id<NSDraggingInfo> dragInfo)
|
||||
{
|
||||
NSPasteboard *pb = [dragInfo draggingPasteboard];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue