mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 04:30:49 +00:00
* Source/NSWindow.m: Temporarily revert previous change for debugging.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29302 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
b9306be2f8
commit
b8d262c293
2 changed files with 29 additions and 18 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2010-01-17 01:04-EST Gregory John Casamento <greg.casamento@gmail.com>
|
||||||
|
|
||||||
|
* Source/NSWindow.m: Temporarily revert previous change for debugging.
|
||||||
|
|
||||||
2010-01-16 Quentin Mathe <quentin.mathe@gmail.com>
|
2010-01-16 Quentin Mathe <quentin.mathe@gmail.com>
|
||||||
|
|
||||||
* Source/NSTableView.m (-_selectColumn:modifiers:): Rewrote to be
|
* Source/NSTableView.m (-_selectColumn:modifiers:): Rewrote to be
|
||||||
|
|
|
@ -869,6 +869,8 @@ many times.
|
||||||
: _backingType
|
: _backingType
|
||||||
: _styleMask
|
: _styleMask
|
||||||
: [_screen screenNumber]];
|
: [_screen screenNumber]];
|
||||||
|
if (_windowNum == 0)
|
||||||
|
[NSException raise:@"No Window" format:@"Failed to obtain window from the back end"];
|
||||||
[srv setwindowlevel: [self level] : _windowNum];
|
[srv setwindowlevel: [self level] : _windowNum];
|
||||||
if (_parent != nil)
|
if (_parent != nil)
|
||||||
[srv setParentWindow: [_parent windowNumber]
|
[srv setParentWindow: [_parent windowNumber]
|
||||||
|
@ -1440,8 +1442,10 @@ many times.
|
||||||
*/
|
*/
|
||||||
- (void) becomeKeyWindow
|
- (void) becomeKeyWindow
|
||||||
{
|
{
|
||||||
if ([self isKeyWindow])
|
if (_f.is_key == NO)
|
||||||
{
|
{
|
||||||
|
_f.is_key = YES;
|
||||||
|
|
||||||
if ((!_firstResponder) || (_firstResponder == self))
|
if ((!_firstResponder) || (_firstResponder == self))
|
||||||
{
|
{
|
||||||
if (_initialFirstResponder)
|
if (_initialFirstResponder)
|
||||||
|
@ -1467,9 +1471,10 @@ many times.
|
||||||
|
|
||||||
- (void) becomeMainWindow
|
- (void) becomeMainWindow
|
||||||
{
|
{
|
||||||
if ([self isMainWindow] == NO)
|
if (_f.is_main == NO)
|
||||||
{
|
{
|
||||||
if ([self isKeyWindow] == NO)
|
_f.is_main = YES;
|
||||||
|
if (_f.is_key == NO)
|
||||||
{
|
{
|
||||||
[_wv setInputState: GSTitleBarMain];
|
[_wv setInputState: GSTitleBarMain];
|
||||||
}
|
}
|
||||||
|
@ -1522,12 +1527,12 @@ many times.
|
||||||
|
|
||||||
- (BOOL) isKeyWindow
|
- (BOOL) isKeyWindow
|
||||||
{
|
{
|
||||||
return ([NSApp keyWindow] == self);
|
return _f.is_key;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL) isMainWindow
|
- (BOOL) isMainWindow
|
||||||
{
|
{
|
||||||
return ([NSApp mainWindow] == self);
|
return _f.is_main;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL) isMiniaturized
|
- (BOOL) isMiniaturized
|
||||||
|
@ -1565,7 +1570,7 @@ many times.
|
||||||
|
|
||||||
- (void) makeKeyWindow
|
- (void) makeKeyWindow
|
||||||
{
|
{
|
||||||
if (!_f.visible || _f.is_miniaturized || [self isKeyWindow])
|
if (!_f.visible || _f.is_miniaturized || _f.is_key == YES)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1578,11 +1583,10 @@ many times.
|
||||||
|
|
||||||
- (void) makeMainWindow
|
- (void) makeMainWindow
|
||||||
{
|
{
|
||||||
if (!_f.visible || _f.is_miniaturized || [self isMainWindow])
|
if (!_f.visible || _f.is_miniaturized || _f.is_main == YES)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (![self canBecomeMainWindow])
|
if (![self canBecomeMainWindow])
|
||||||
return;
|
return;
|
||||||
[[NSApp mainWindow] resignMainWindow];
|
[[NSApp mainWindow] resignMainWindow];
|
||||||
|
@ -1762,13 +1766,15 @@ many times.
|
||||||
|
|
||||||
- (void) resignKeyWindow
|
- (void) resignKeyWindow
|
||||||
{
|
{
|
||||||
if ([self isKeyWindow])
|
if (_f.is_key == YES)
|
||||||
{
|
{
|
||||||
if ((_firstResponder != self)
|
if ((_firstResponder != self)
|
||||||
&& [_firstResponder respondsToSelector: @selector(resignKeyWindow)])
|
&& [_firstResponder respondsToSelector: @selector(resignKeyWindow)])
|
||||||
[_firstResponder resignKeyWindow];
|
[_firstResponder resignKeyWindow];
|
||||||
|
|
||||||
if ([self isMainWindow])
|
_f.is_key = NO;
|
||||||
|
|
||||||
|
if (_f.is_main == YES)
|
||||||
{
|
{
|
||||||
[_wv setInputState: GSTitleBarMain];
|
[_wv setInputState: GSTitleBarMain];
|
||||||
}
|
}
|
||||||
|
@ -1784,9 +1790,10 @@ many times.
|
||||||
|
|
||||||
- (void) resignMainWindow
|
- (void) resignMainWindow
|
||||||
{
|
{
|
||||||
if ([self isMainWindow])
|
if (_f.is_main == YES)
|
||||||
{
|
{
|
||||||
if ([self isKeyWindow])
|
_f.is_main = NO;
|
||||||
|
if (_f.is_key == YES)
|
||||||
{
|
{
|
||||||
[_wv setInputState: GSTitleBarKey];
|
[_wv setInputState: GSTitleBarKey];
|
||||||
}
|
}
|
||||||
|
@ -2565,7 +2572,7 @@ discardCursorRectsForView(NSView *theView)
|
||||||
|
|
||||||
if (_f.cursor_rects_valid)
|
if (_f.cursor_rects_valid)
|
||||||
{
|
{
|
||||||
if ([self isKeyWindow] && _f.cursor_rects_enabled)
|
if (_f.is_key && _f.cursor_rects_enabled)
|
||||||
{
|
{
|
||||||
NSEvent *e = [NSEvent otherEventWithType: NSAppKitDefined
|
NSEvent *e = [NSEvent otherEventWithType: NSAppKitDefined
|
||||||
location: NSMakePoint(-1, -1)
|
location: NSMakePoint(-1, -1)
|
||||||
|
@ -2616,7 +2623,7 @@ resetCursorRectsForView(NSView *theView)
|
||||||
resetCursorRectsForView(_wv);
|
resetCursorRectsForView(_wv);
|
||||||
_f.cursor_rects_valid = YES;
|
_f.cursor_rects_valid = YES;
|
||||||
|
|
||||||
if ([self isKeyWindow] && _f.cursor_rects_enabled)
|
if (_f.is_key && _f.cursor_rects_enabled)
|
||||||
{
|
{
|
||||||
NSPoint loc = [self mouseLocationOutsideOfEventStream];
|
NSPoint loc = [self mouseLocationOutsideOfEventStream];
|
||||||
if (NSMouseInRect(loc, [_wv bounds], NO))
|
if (NSMouseInRect(loc, [_wv bounds], NO))
|
||||||
|
@ -3580,12 +3587,12 @@ resetCursorRectsForView(NSView *theView)
|
||||||
{
|
{
|
||||||
case NSLeftMouseDown:
|
case NSLeftMouseDown:
|
||||||
{
|
{
|
||||||
BOOL wasKey = [self isKeyWindow];
|
BOOL wasKey = _f.is_key;
|
||||||
|
|
||||||
if (_f.has_closed == NO)
|
if (_f.has_closed == NO)
|
||||||
{
|
{
|
||||||
v = [_wv hitTest: [theEvent locationInWindow]];
|
v = [_wv hitTest: [theEvent locationInWindow]];
|
||||||
if ([self isKeyWindow] == NO && _windowLevel != NSDesktopWindowLevel)
|
if (_f.is_key == NO && _windowLevel != NSDesktopWindowLevel)
|
||||||
{
|
{
|
||||||
/* NSPanel modification: check becomesKeyOnlyIfNeeded. */
|
/* NSPanel modification: check becomesKeyOnlyIfNeeded. */
|
||||||
if (![self becomesKeyOnlyIfNeeded]
|
if (![self becomesKeyOnlyIfNeeded]
|
||||||
|
@ -3737,7 +3744,7 @@ resetCursorRectsForView(NSView *theView)
|
||||||
*/
|
*/
|
||||||
(*ctImp)(self, ctSel, _wv, theEvent);
|
(*ctImp)(self, ctSel, _wv, theEvent);
|
||||||
|
|
||||||
if ([self isKeyWindow])
|
if (_f.is_key)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* We need to go through all of the views, and if there is any with
|
* We need to go through all of the views, and if there is any with
|
||||||
|
@ -3952,7 +3959,7 @@ resetCursorRectsForView(NSView *theView)
|
||||||
* determine if we should send a NSMouseExited event. */
|
* determine if we should send a NSMouseExited event. */
|
||||||
(*ctImp)(self, ctSel, _wv, theEvent);
|
(*ctImp)(self, ctSel, _wv, theEvent);
|
||||||
|
|
||||||
if ([self isKeyWindow])
|
if (_f.is_key)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* We need to go through all of the views, and if
|
* We need to go through all of the views, and if
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue