< prev index next >
src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java
Print this page
*** 542,551 ****
--- 542,552 ----
run(PRIMARY_LOOP);
}
public void run(boolean loop)
{
+ Unsafe unsafe = Unsafe.getUnsafe();
XEvent ev = new XEvent();
while(true) {
// Fix for 6829923: we should gracefully handle toolkit thread interruption
if (Thread.currentThread().isInterrupted()) {
// We expect interruption from the AppContext.dispose() method only.
*** 596,606 ****
eventLog.finer("{0}", ev);
}
// Check if input method consumes the event
long w = 0;
! if (windowToXWindow(ev.get_xany().get_window()) != null) {
Component owner =
XKeyboardFocusManagerPeer.getInstance().getCurrentFocusOwner();
if (owner != null) {
XWindow ownerWindow = AWTAccessor.getComponentAccessor().getPeer(owner);
if (ownerWindow != null) {
--- 597,608 ----
eventLog.finer("{0}", ev);
}
// Check if input method consumes the event
long w = 0;
! if (!unsafe.shouldBeInitialized(XKeyboardFocusManagerPeer.class)
! && windowToXWindow(ev.get_xany().get_window()) != null) {
Component owner =
XKeyboardFocusManagerPeer.getInstance().getCurrentFocusOwner();
if (owner != null) {
XWindow ownerWindow = AWTAccessor.getComponentAccessor().getPeer(owner);
if (ownerWindow != null) {
< prev index next >