mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 22:10:36 +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>
|
||||
|
||||
* Source/NSWorkspace.m: ([-getInfoForFile:application:type:])
|
||||
|
|
|
@ -115,6 +115,7 @@ APPKIT_EXPORT NSSize NSTokenSize;
|
|||
NSView *_initialFirstResponder;
|
||||
id _delegate;
|
||||
id _fieldEditor;
|
||||
id _lastView;
|
||||
id _lastDragView;
|
||||
int _lastDragOperationMask;
|
||||
int _windowNum;
|
||||
|
|
|
@ -2732,7 +2732,7 @@ resetCursorRectsForView(NSView *theView)
|
|||
// 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.
|
||||
*/
|
||||
- (void) sendEvent: (NSEvent*)theEvent
|
||||
|
@ -2770,8 +2770,8 @@ Code shared with [NSPanel -sendEvent:], remember to update both places.
|
|||
{
|
||||
[self makeFirstResponder: v];
|
||||
}
|
||||
if (_lastDragView)
|
||||
DESTROY(_lastDragView);
|
||||
if (_lastView)
|
||||
DESTROY(_lastView);
|
||||
if (wasKey == YES || [v acceptsFirstMouse: theEvent] == YES)
|
||||
{
|
||||
if ([NSHelpManager isContextHelpModeActive])
|
||||
|
@ -2780,10 +2780,7 @@ Code shared with [NSPanel -sendEvent:], remember to update both places.
|
|||
}
|
||||
else
|
||||
{
|
||||
/* Technically this should be just _lastView,
|
||||
but I don't think it's a problem reusing this
|
||||
ivar */
|
||||
ASSIGN(_lastDragView, v);
|
||||
ASSIGN(_lastView, v);
|
||||
[v mouseDown: theEvent];
|
||||
}
|
||||
}
|
||||
|
@ -2797,8 +2794,8 @@ Code shared with [NSPanel -sendEvent:], remember to update both places.
|
|||
}
|
||||
|
||||
case NSLeftMouseUp:
|
||||
v = _lastDragView;
|
||||
DESTROY(_lastDragView);
|
||||
v = _lastView;
|
||||
DESTROY(_lastView);
|
||||
if (v == nil)
|
||||
break;
|
||||
[v mouseUp: theEvent];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue