mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-25 16:20:58 +00:00
Handle case when makeFirstResonder: fails.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@25456 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
9a371e74bd
commit
136c7c950c
2 changed files with 69 additions and 22 deletions
29
ChangeLog
29
ChangeLog
|
@ -1,3 +1,31 @@
|
|||
2007-09-06 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSWindow.m (-sendEvent:, -selectKeyViewFollowingView:,
|
||||
-selectKeyViewPrecedingView:, -selectNextKeyView:,
|
||||
-selectPreviousKeyView:): Handle case when makeFirstResonder:
|
||||
fails.
|
||||
|
||||
2007-09-05 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSLayoutManager.m
|
||||
(-glyphIndexForPoint:...fractionOfDistanceThroughGlyph:): Don't
|
||||
ignore invisible glyphs.
|
||||
* Source/NSTextView.m (-_characterIndexForPoint:respectFraction:):
|
||||
New helper method.
|
||||
* Source/NSTextView.m (-characterIndexForPoint:): Correct to use
|
||||
screen coordinates.
|
||||
* Source/NSTextView.m (-draggingEntered:, -draggingUpdated:,
|
||||
-mouseDown:): Use new helper method.
|
||||
* Source/NSAlert.m (-_setupPanel): Check count of buttons.
|
||||
* Source/NSDocument.m (-setFileName:, -setFileURL:): Set url and
|
||||
file name always together.
|
||||
* Source/NSDocument.m (-dataOfType:error:,
|
||||
-fileWrapperOfType:error:, -readFromFileWrapper:ofType:error:,
|
||||
-readFromURL:ofType:error:, -writeSafelyToURL:...error:,
|
||||
-writeToURL:ofType:error:, -writeToURL:...error:,
|
||||
-printOperationWithSettings:error:): Set error to nil.
|
||||
Patches by Wolfgang Lux <wolfgang.lux@gmail.com>.
|
||||
|
||||
2007-09-04 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSActionCell.m (-objectValue, -attributedStringValue):
|
||||
|
@ -412,7 +440,6 @@
|
|||
* Source/NSBitmapImageRep+GIF.m : removed some C99-isms
|
||||
* Source/NSDocument.m : removed some C99-isms
|
||||
|
||||
|
||||
2007-05-10 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSAnimation.m: removed some C99-isms and simplified by
|
||||
|
|
|
@ -2803,8 +2803,10 @@ resetCursorRectsForView(NSView *theView)
|
|||
return NO;
|
||||
|
||||
if (![aResponder acceptsFirstResponder])
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
|
||||
/* So that the implementation of -resignFirstResponder in
|
||||
_firstResponder might ask for what will be the new first
|
||||
|
@ -2816,7 +2818,9 @@ resetCursorRectsForView(NSView *theView)
|
|||
* Change only if it replies YES.
|
||||
*/
|
||||
if ((_firstResponder) && (![_firstResponder resignFirstResponder]))
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
|
||||
_firstResponder = aResponder;
|
||||
if ((aResponder == nil) || ![_firstResponder becomeFirstResponder])
|
||||
|
@ -3274,14 +3278,18 @@ resetCursorRectsForView(NSView *theView)
|
|||
{
|
||||
v = [_wv hitTest: [theEvent locationInWindow]];
|
||||
}
|
||||
if (_firstResponder != v)
|
||||
{
|
||||
[self makeFirstResponder: v];
|
||||
}
|
||||
if (_lastView)
|
||||
{
|
||||
DESTROY(_lastView);
|
||||
}
|
||||
if (_firstResponder != v)
|
||||
{
|
||||
// Only try to set first responder, when the view wants it.
|
||||
if ([v acceptsFirstResponder] && ![self makeFirstResponder: v])
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (wasKey == YES || [v acceptsFirstMouse: theEvent] == YES)
|
||||
{
|
||||
if ([NSHelpManager isContextHelpModeActive])
|
||||
|
@ -3843,7 +3851,10 @@ resetCursorRectsForView(NSView *theView)
|
|||
theView = [aView nextValidKeyView];
|
||||
if (theView)
|
||||
{
|
||||
[self makeFirstResponder: theView];
|
||||
if (![self makeFirstResponder: theView])
|
||||
{
|
||||
return;
|
||||
}
|
||||
if ([theView respondsToSelector:@selector(selectText:)])
|
||||
{
|
||||
_selectionDirection = NSSelectingNext;
|
||||
|
@ -3864,7 +3875,10 @@ resetCursorRectsForView(NSView *theView)
|
|||
theView = [aView previousValidKeyView];
|
||||
if (theView)
|
||||
{
|
||||
[self makeFirstResponder: theView];
|
||||
if (![self makeFirstResponder: theView])
|
||||
{
|
||||
return;
|
||||
}
|
||||
if ([theView respondsToSelector:@selector(selectText:)])
|
||||
{
|
||||
_selectionDirection = NSSelectingPrevious;
|
||||
|
@ -3900,7 +3914,10 @@ resetCursorRectsForView(NSView *theView)
|
|||
|
||||
if (theView)
|
||||
{
|
||||
[self makeFirstResponder: theView];
|
||||
if (![self makeFirstResponder: theView])
|
||||
{
|
||||
return;
|
||||
}
|
||||
if ([theView respondsToSelector:@selector(selectText:)])
|
||||
{
|
||||
_selectionDirection = NSSelectingNext;
|
||||
|
@ -3936,7 +3953,10 @@ resetCursorRectsForView(NSView *theView)
|
|||
|
||||
if (theView)
|
||||
{
|
||||
[self makeFirstResponder: theView];
|
||||
if (![self makeFirstResponder: theView])
|
||||
{
|
||||
return;
|
||||
}
|
||||
if ([theView respondsToSelector:@selector(selectText:)])
|
||||
{
|
||||
_selectionDirection = NSSelectingPrevious;
|
||||
|
|
Loading…
Reference in a new issue