[ https://issues.apache.org/jira/browse/PIVOT-1013?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16250497#comment-16250497 ]
Roger Whitcomb commented on PIVOT-1013: --------------------------------------- Implemented the code. Also added a configurable delay to the queuing. Typically the delay would be related to a window close transition duration, such as for MenuPopup or similar. Sending wtk\src\org\apache\pivot\wtk\Action.java Sending wtk\src\org\apache\pivot\wtk\Button.java Transmitting file data ..done Committing transaction... Committed revision 1815154. Other changes were made to "Button.java" related to PIVOT-999 and PIVOT-1012. > Allow button presses to queue the action to be performed instead of doing it > directly. > -------------------------------------------------------------------------------------- > > Key: PIVOT-1013 > URL: https://issues.apache.org/jira/browse/PIVOT-1013 > Project: Pivot > Issue Type: Improvement > Components: wtk > Reporter: Roger Whitcomb > Assignee: Roger Whitcomb > Priority: Minor > > In some applications if an action is performed, it will invoke a dialog or > open another window. If that action has been triggered from a MenuPopup (so > in this case the button will be a MenuButton subclass of Button) the focus > will be stolen from the invoked dialog back to the main window by the closing > of the MenuPopup. The result is that the user must click another time on the > dialog. So, one solution to this dilemma is to queue the action to be > performed "later" on the event queue. This allows the menu popup window to > close before the action is invoked and therefore the focus can be shifted > properly. > So, add a property to Button, which will be set by MenuButton to queue the > action instead of performing it directly inside "Button.press()". > This is a Proof-Of-Concept since I haven't yet figured out how to get this to > work properly. -- This message was sent by Atlassian JIRA (v6.4.14#64029)