< prev index next >

src/java.desktop/unix/classes/sun/awt/X11/XBaseMenuWindow.java

Print this page

        

*** 1085,1095 **** wnd.selectItem(item, false); } } } else { //Invoke action event ! item.action(mouseEvent.getWhen(), mouseEvent.getModifiers()); ungrabInput(); } } else { //Mouse is released outside menu items if (hasPointerMoved || (wnd instanceof XMenuBarPeer)) { --- 1085,1097 ---- wnd.selectItem(item, false); } } } else { //Invoke action event ! @SuppressWarnings("deprecation") ! final int modifiers = mouseEvent.getModifiers(); ! item.action(mouseEvent.getWhen(), modifiers); ungrabInput(); } } else { //Mouse is released outside menu items if (hasPointerMoved || (wnd instanceof XMenuBarPeer)) {
*** 1198,1208 **** //If the current item has submenu show it //Perform action otherwise if (citem instanceof XMenuPeer) { cwnd.selectItem(citem, true); } else if (citem != null) { ! citem.action(event.getWhen(), event.getModifiers()); ungrabInput(); } break; case KeyEvent.VK_ESCAPE: //If current window is menu bar or its child - close it --- 1200,1212 ---- //If the current item has submenu show it //Perform action otherwise if (citem instanceof XMenuPeer) { cwnd.selectItem(citem, true); } else if (citem != null) { ! @SuppressWarnings("deprecation") ! final int modifiers = event.getModifiers(); ! citem.action(event.getWhen(), modifiers); ungrabInput(); } break; case KeyEvent.VK_ESCAPE: //If current window is menu bar or its child - close it
< prev index next >