mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 20:40:47 +00:00
Dispatch drag events with -[NSApp sendEvent:] and make each synthetized drag
event the current event in order to be consistent with Mac OS X behavior. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29418 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
471c112e9d
commit
57cdb1250b
3 changed files with 19 additions and 1 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2010-01-27 Quentin Mathe <quentin.mathe@gmail.com>
|
||||||
|
|
||||||
|
* NSApplication.m (-_postAndSendEvent:): Added.
|
||||||
|
* Source/GSDragView
|
||||||
|
(-_sendLocalEvent:action:position:timestamp:toWindow:): Dispatch drag
|
||||||
|
events -[NSApp _postAndSendEvent:] to match Mac OS X behavior.
|
||||||
|
|
||||||
2010-01-26 Eric Wasylishen <ewasylishen@gmail.com>
|
2010-01-26 Eric Wasylishen <ewasylishen@gmail.com>
|
||||||
|
|
||||||
* Source/NSView.m (-setHidden:): When hiding a view, we need to
|
* Source/NSView.m (-setHidden:): When hiding a view, we need to
|
||||||
|
|
|
@ -57,6 +57,10 @@
|
||||||
@interface GSRawWindow : NSWindow
|
@interface GSRawWindow : NSWindow
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
@interface NSApplication (GNUstepPrivate)
|
||||||
|
- (void) _postAndSendEvent: (NSEvent *)anEvent;
|
||||||
|
@end
|
||||||
|
|
||||||
@interface NSCursor (BackendPrivate)
|
@interface NSCursor (BackendPrivate)
|
||||||
- (void *)_cid;
|
- (void *)_cid;
|
||||||
- (void) _setCid: (void *)val;
|
- (void) _setCid: (void *)val;
|
||||||
|
@ -576,7 +580,7 @@ static GSDragView *sharedDragView = nil;
|
||||||
subtype: subtype
|
subtype: subtype
|
||||||
data1: dragWindowRef
|
data1: dragWindowRef
|
||||||
data2: action];
|
data2: action];
|
||||||
[dWindow sendEvent: e];
|
[NSApp _postAndSendEvent: e];
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -2007,6 +2007,13 @@ See -runModalForWindow:
|
||||||
* Getting, removing, and posting events
|
* Getting, removing, and posting events
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* Private method used by GSDragView to dispatch drag events as Cocoa does. */
|
||||||
|
- (void) _postAndSendEvent: (NSEvent *)anEvent
|
||||||
|
{
|
||||||
|
ASSIGN(_current_event, anEvent);
|
||||||
|
[self sendEvent: anEvent];
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called by -run to dispatch events that are received according to AppKit's
|
* Called by -run to dispatch events that are received according to AppKit's
|
||||||
* forwarding conventions. You rarely need to invoke this directly. If you
|
* forwarding conventions. You rarely need to invoke this directly. If you
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue