<AWT Dev>  RFR 8205479: OS X: requestFocus() does not work properly for embedded frame
dmitry.markov at oracle.com
Wed Jun 27 17:25:50 UTC 2018
You are right, it is better to use synthesizeWindowActivation(). Please find the updated webrew here: http://cr.openjdk.java.net/~dmarkov/8205479/webrev.01/ <http://cr.openjdk.java.net/~dmarkov/8205479/webrev.01/>
- Overrode synthesizeWindowActivation() for CEmbeddedFrame. It calls handleWindowFocusEvent() which actually activates or deactivates embedded frame.
- Added updateGlobalFocusedWindow() to CEmbeddedFrame. This method should be called when the focus is transferred to embedded frame programmatically since handleWindowFocusEvent() skips activation for non-focused embedded frames.
> On 27 Jun 2018, at 01:20, Sergey Bylokhov <Sergey.Bylokhov at oracle.com> wrote:
> Hi, Dmitry.
> Can you please confirm that we should not implement synthesizeWindowActivation() to achieve this behavior?
> I guess we should do the same as in CViewEmbeddedFrame which is used by SWT.
> On 25/06/2018 09:11, Dmitry Markov wrote:
>> Could you review a fix for jdk11, please?
>> bug: https://bugs.openjdk.java.net/browse/JDK-8205479
>> webrev: http://cr.openjdk.java.net/~dmarkov/8205479/webrev.00/
>> Problem description:
>> On Mac OSX when focus is transferred to some component located at embedded frame, CPlatformEmbeddedFrame.requestWindowFocus() is called to activate owning frame. However that method does nothing, (i.e. no activation happens). As a result the focus cannot be transferred to the component because its owner is not active.
>> CPlatformEmbeddedFrame.requestWindowFocus() should activate the embedded frame, (i.e. invoke notifyActivation() for the corresponding peer).
> Best regards, Sergey.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the awt-dev