Review request for 7124430: [macosx] LWCToolkit.grab() and LWCToolkit.ungrab() events are not implemented yet
Anton V. Tarasov
anton.tarasov at oracle.com
Fri Jan 13 07:49:59 PST 2012
Hi Anthony,
Thanks for the tip. Though I did look through some forum discussions
where people asked question
"is it possible to catch a mouse down event in a frame's titlebar?" The
answer was "not a direct way".
Commonly, a suggestion is to workaround it by means of -windowWillMove
usage, but this looks quite
odd to me...
For instance:
http://www.cocoabuilder.com/archive/cocoa/6725-catching-mousedown-in-an-nswindow-titlebar.html
"PS: I have tried to overiding -sendEvent in the instance of a subclass
of NSApplication object to see what events are going thru, mouseDown
and mouseUp events in the titlebar don't go thru. It's seem that the
windows are moved directly by the WindowServer, as you explained me."
Did you have an experience of trying it yourself?
Thanks,
Anton.
On 1/13/12 4:58 PM, Anthony Petrov wrote:
> Hi Anton,
>
> You want to override NSWindow -sendEvent: in order to catch clicks on
> the titlebar of windows on the Mac.
>
> --
> best regards,
> Anthony
>
> On 1/13/2012 6:36 PM, Anton V. Tarasov wrote:
>> Hello,
>>
>> Please review a fix for 7124430.
>>
>> webrev: http://cr.openjdk.java.net/~ant/7124430/webrev.1/
>>
>> UngrabEvent dispatching is implemented according to the cases mentioned
>> in the UngrabEvent class description, except for the case of clicking
>> in an owner frame's title. The latter, as I found, can't be implemented
>> on Mac OS X platform. Along with the implementation, a regression test
>> is proposed.
>>
>> Thanks,
>> Anton.
>>
>>
More information about the macosx-port-dev
mailing list