diff --git a/src/solaris/classes/sun/awt/X11/XBaseMenuWindow.java b/src/solaris/classes/sun/awt/X11/XBaseMenuWindow.java index f0b1aef36cd50261d2605fb90223b1107e10bc65..ade334c269b0f749f63e69fc4d9b3a879afa2543 100644 --- a/src/solaris/classes/sun/awt/X11/XBaseMenuWindow.java +++ b/src/solaris/classes/sun/awt/X11/XBaseMenuWindow.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2005, 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 @@ -904,11 +904,12 @@ abstract public class XBaseMenuWindow extends XWindow { */ public void dispose() { setDisposed(true); - EventQueue.invokeLater(new Runnable() { + InvocationEvent ev = new InvocationEvent(target, new Runnable() { public void run() { doDispose(); } }); + super.postEvent(ev); } /** @@ -933,11 +934,12 @@ abstract public class XBaseMenuWindow extends XWindow { * so events can not be processed using standart means */ void postEvent(final AWTEvent event) { - EventQueue.invokeLater(new Runnable() { - public void run() { - handleEvent(event); - } - }); + InvocationEvent ev = new InvocationEvent(event.getSource(), new Runnable() { + public void run() { + handleEvent(event); + } + }); + super.postEvent(ev); } /** diff --git a/src/solaris/classes/sun/awt/X11/XChoicePeer.java b/src/solaris/classes/sun/awt/X11/XChoicePeer.java index a9fc4969875d90153d3895410e2cbea4f7b02b3e..d06bdb90fd0de2a7cb0ea974d1ba33bf05868df4 100644 --- a/src/solaris/classes/sun/awt/X11/XChoicePeer.java +++ b/src/solaris/classes/sun/awt/X11/XChoicePeer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2007, Oracle and/or its affiliates. All rights reserved. + * 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 @@ -1033,15 +1033,17 @@ public class XChoicePeer extends XComponentPeer implements ChoicePeer, ToplevelS //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); - } + 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){ @@ -1083,11 +1085,13 @@ public class XChoicePeer extends XComponentPeer implements ChoicePeer, ToplevelS //convenient method //do not generate this kind of Events public boolean handleMouseEventByChoice(final MouseEvent me){ - EventQueue.invokeLater(new Runnable() { - public void run() { - handleJavaMouseEvent(me); - } - }); + InvocationEvent ev = new InvocationEvent(target, new Runnable() { + public void run() { + handleJavaMouseEvent(me); + } + }); + postEvent(ev); + return true; } diff --git a/src/solaris/classes/sun/awt/X11/XListPeer.java b/src/solaris/classes/sun/awt/X11/XListPeer.java index eeeed3975cdf996f17e4a5b96c36405404c39743..7d2ac0fe14a4523499ef47e3024948532e77754c 100644 --- a/src/solaris/classes/sun/awt/X11/XListPeer.java +++ b/src/solaris/classes/sun/awt/X11/XListPeer.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved. + * 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 @@ -1669,11 +1669,12 @@ class XListPeer extends XComponentPeer implements ListPeer, XScrollbarClient { * Do handleJavaMouseEvent on EDT */ void handleJavaMouseEventOnEDT(final MouseEvent me){ - EventQueue.invokeLater(new Runnable() { - public void run() { - handleJavaMouseEvent(me); - } - }); + InvocationEvent ev = new InvocationEvent(target, new Runnable() { + public void run() { + handleJavaMouseEvent(me); + } + }); + postEvent(ev); } /*