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

Print this page

        

*** 592,602 **** long w = 0; if (windowToXWindow(ev.get_xany().get_window()) != null) { Component owner = XKeyboardFocusManagerPeer.getInstance().getCurrentFocusOwner(); if (owner != null) { ! XWindow ownerWindow = (XWindow) AWTAccessor.getComponentAccessor().getPeer(owner); if (ownerWindow != null) { w = ownerWindow.getContentWindow(); } } } --- 592,602 ---- 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) { w = ownerWindow.getContentWindow(); } } }
*** 2436,2456 **** removeEventDispatcher(win.getWindow(), oops_waiter); eventLog.finer("Exiting syncNativeQueue"); awtUnlock(); } } - @SuppressWarnings("deprecation") public void grab(Window w) { ! if (w.getPeer() != null) { ! ((XWindowPeer)w.getPeer()).setGrab(true); } } - @SuppressWarnings("deprecation") public void ungrab(Window w) { ! if (w.getPeer() != null) { ! ((XWindowPeer)w.getPeer()).setGrab(false); } } /** * Returns if the java.awt.Desktop class is supported on the current * desktop. --- 2436,2456 ---- removeEventDispatcher(win.getWindow(), oops_waiter); eventLog.finer("Exiting syncNativeQueue"); awtUnlock(); } } public void grab(Window w) { ! final Object peer = AWTAccessor.getComponentAccessor().getPeer(w); ! if (peer != null) { ! ((XWindowPeer) peer).setGrab(true); } } public void ungrab(Window w) { ! final Object peer = AWTAccessor.getComponentAccessor().getPeer(w); ! if (peer != null) { ! ((XWindowPeer) peer).setGrab(false); } } /** * Returns if the java.awt.Desktop class is supported on the current * desktop.