Kuix project tracker

#11 Internal menu 'Select' button doesn't work with a touch screen when popup-menu is visible

2008-12-02 13:28  |   Trivial 
Submit by artur

State: Opened
Priority: Trivial
Type: Bug
Milestone: -
Release: Kuix 1.0.1
Body:

Pressing the Select button on the touch display when a popup-menu is visible will only hide the popup. It should execute the popup-menu item.

This was tested on the Sun WTK 2.5.2 emulator and SE G700 and SE P1.

The following change seems to fix it.

Index: kuix/org/kalmeo/kuix/widget/Menu.java
===================================================================
--- kuix/org/kalmeo/kuix/widget/Menu.java   
+++ kuix/org/kalmeo/kuix/widget/Menu.java 
@@ -109,6 +109,12 @@
                  */
                 public boolean processPointerEvent(byte type, int x, int y) {
                     boolean superProcess = super.processPointerEvent(type, x, y);
+                   
+                    if (!superProcess) {
+                        FocusManager menuFocusManager = ((MenuPopup)this.rootWidget).getMenu().getFocusManager();
+                        superProcess = menuFocusManager.processPointerEvent(type, x, y);
+                    }
+                   
                     if (type == KuixConstants.POINTER_RELEASED_EVENT_TYPE) {
                         if (!superProcess) {
                             hideMenuPopup();

 

 

 

Comments

Tofu 2008-12-02 13:28

Yes, but in this case all active widget under the popup will intercept the pointer event, for example a button on the desktop ... and the popup wouldn't close.