API change RT-19955: Configuring a PopupWindow so that it consumes the event used for hiding

Lubomir Nerad lubomir.nerad at oracle.com
Wed May 9 04:36:09 PDT 2012


On 5/7/2012 10:43 PM, Richard Bair wrote:
>>> Hi Lubo,
>>>
>>> why do you think that the name is ambiguous? Seems clear to me. Some
>>> other thoughts:
>> I don't remember how exactly the auto-hide feature for popups is implemented. Is it sometimes triggered from Glass ("ungrab" event)? What event will be consumed in this case?
>>
>> Are we confident we'll be able to implement this property? If a popup is auto-hidden from the ungrab event handler, there may be no direct connection between this event and the mouse/key/etc. event to consume.
> Before approving the API addition I guess we need to know the answer to this. Likewise, the default behavior I think is platform specific. At least in Safari, it seems that it does not consume mouse events by default that cause the popup to be closed. However I know Cocoa has an API for specifying what this behavior should be. If we add such an API, we probably will want to make sure it defaults to some platform specific value rather than always defaulting to "true" or "false"?
>

The property only aims at controlling the events between the popup and 
its parent window. Ungrab events and possible mouse clicks which caused 
them (outside of the popup window and its parent window) can't be 
influenced in general (and probably shouldn't be).

In Safari, it seems to me that the events are actually consumed. If you 
invoke preferences and in one tab page expand a combo box, then click on 
an another control in the same tab page, the function of that other 
control is not executed. Only if the interaction involves multiple 
windows, I can see that the event is not consumed. With the property we 
will control this behavior among controls / popups of a single window, 
while leaving the behavior between multiple windows OS dependent.

Thanks,
Lubo






More information about the openjfx-dev mailing list