src/solaris/classes/sun/awt/X11/XChoicePeer.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2003, 2007, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 1031,1049 **** return super.prePostEvent(e); } //fix 6252982: PIT: Keyboard FocusTraversal not working when choice's drop-down is visible, on XToolkit if (e instanceof KeyEvent){ // notify XWindow that this event had been already handled and no need to post it again ! EventQueue.invokeLater(new Runnable() { public void run() { if(target.isFocusable() && getParentTopLevel().isFocusableWindow() ) { handleJavaKeyEvent((KeyEvent)e); } } }); return true; } else { if (e instanceof MouseEvent){ // Fix for 6240046 : REG:Choice's Drop-down does not disappear when clicking somewhere, after popup menu is disposed // if user presses Right Mouse Button on opened (unfurled) --- 1031,1051 ---- return super.prePostEvent(e); } //fix 6252982: PIT: Keyboard FocusTraversal not working when choice's drop-down is visible, on XToolkit if (e instanceof KeyEvent){ // notify XWindow that this event had been already handled and no need to post it again ! InvocationEvent ev = new InvocationEvent(target, new Runnable() { public void run() { if(target.isFocusable() && getParentTopLevel().isFocusableWindow() ) { handleJavaKeyEvent((KeyEvent)e); } } }); + postEvent(ev); + return true; } else { if (e instanceof MouseEvent){ // Fix for 6240046 : REG:Choice's Drop-down does not disappear when clicking somewhere, after popup menu is disposed // if user presses Right Mouse Button on opened (unfurled)
*** 1081,1095 **** } //convenient method //do not generate this kind of Events public boolean handleMouseEventByChoice(final MouseEvent me){ ! EventQueue.invokeLater(new Runnable() { public void run() { handleJavaMouseEvent(me); } }); return true; } /* Returns true if the MouseEvent coords * are inside of the Choice itself (it doesnt's depends on --- 1083,1099 ---- } //convenient method //do not generate this kind of Events public boolean handleMouseEventByChoice(final MouseEvent me){ ! InvocationEvent ev = new InvocationEvent(target, new Runnable() { public void run() { handleJavaMouseEvent(me); } }); + postEvent(ev); + return true; } /* Returns true if the MouseEvent coords * are inside of the Choice itself (it doesnt's depends on