mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-04 13:20:42 +00:00
New ivar for mouseDown view
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@14635 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
520d119709
commit
c6fdfc994b
3 changed files with 13 additions and 9 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2002-10-03 Adam Fedor <fedor@gnu.org>
|
||||||
|
|
||||||
|
* Headers/gnustep/gui/NSWindow.h: New _lastView ivar.
|
||||||
|
* Source/NSWindow.m (-sendEvent:): Use it instead of _lastDragView
|
||||||
|
to remember mouseDown view.
|
||||||
|
|
||||||
2002-10-02 Richard Frith-Macdonald <rfm@gnu.org>
|
2002-10-02 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
* Source/NSWorkspace.m: ([-getInfoForFile:application:type:])
|
* Source/NSWorkspace.m: ([-getInfoForFile:application:type:])
|
||||||
|
|
|
@ -115,6 +115,7 @@ APPKIT_EXPORT NSSize NSTokenSize;
|
||||||
NSView *_initialFirstResponder;
|
NSView *_initialFirstResponder;
|
||||||
id _delegate;
|
id _delegate;
|
||||||
id _fieldEditor;
|
id _fieldEditor;
|
||||||
|
id _lastView;
|
||||||
id _lastDragView;
|
id _lastDragView;
|
||||||
int _lastDragOperationMask;
|
int _lastDragOperationMask;
|
||||||
int _windowNum;
|
int _windowNum;
|
||||||
|
|
|
@ -2732,7 +2732,7 @@ resetCursorRectsForView(NSView *theView)
|
||||||
// Quietly discard an unused mouse down.
|
// Quietly discard an unused mouse down.
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Handles mouse and other events sent to the received by NSApplication.
|
/** Handles mouse and other events sent to the receiver by NSApplication.
|
||||||
Do not invoke this method directly.
|
Do not invoke this method directly.
|
||||||
*/
|
*/
|
||||||
- (void) sendEvent: (NSEvent*)theEvent
|
- (void) sendEvent: (NSEvent*)theEvent
|
||||||
|
@ -2770,8 +2770,8 @@ Code shared with [NSPanel -sendEvent:], remember to update both places.
|
||||||
{
|
{
|
||||||
[self makeFirstResponder: v];
|
[self makeFirstResponder: v];
|
||||||
}
|
}
|
||||||
if (_lastDragView)
|
if (_lastView)
|
||||||
DESTROY(_lastDragView);
|
DESTROY(_lastView);
|
||||||
if (wasKey == YES || [v acceptsFirstMouse: theEvent] == YES)
|
if (wasKey == YES || [v acceptsFirstMouse: theEvent] == YES)
|
||||||
{
|
{
|
||||||
if ([NSHelpManager isContextHelpModeActive])
|
if ([NSHelpManager isContextHelpModeActive])
|
||||||
|
@ -2780,10 +2780,7 @@ Code shared with [NSPanel -sendEvent:], remember to update both places.
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Technically this should be just _lastView,
|
ASSIGN(_lastView, v);
|
||||||
but I don't think it's a problem reusing this
|
|
||||||
ivar */
|
|
||||||
ASSIGN(_lastDragView, v);
|
|
||||||
[v mouseDown: theEvent];
|
[v mouseDown: theEvent];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2797,8 +2794,8 @@ Code shared with [NSPanel -sendEvent:], remember to update both places.
|
||||||
}
|
}
|
||||||
|
|
||||||
case NSLeftMouseUp:
|
case NSLeftMouseUp:
|
||||||
v = _lastDragView;
|
v = _lastView;
|
||||||
DESTROY(_lastDragView);
|
DESTROY(_lastView);
|
||||||
if (v == nil)
|
if (v == nil)
|
||||||
break;
|
break;
|
||||||
[v mouseUp: theEvent];
|
[v mouseUp: theEvent];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue