jdk Sdiff src/solaris/classes/sun/awt/X11 (original) (raw)
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 / 25 26 package sun.awt.X11; 27 28 import java.awt.; 29 30 /** 31 * This class represent focus holder window implementation. When toplevel requests or receives focus 32 * it instead sets focus to this proxy. This proxy is mapped but invisible(it is kept at (-1,-1)) 33 * and therefore X doesn't control focus after we have set it to proxy. 34 */ 35 public class XFocusProxyWindow extends XBaseWindow { 36 XWindowPeer owner; 37 38 public XFocusProxyWindow(XWindowPeer owner) { 39 super(new XCreateWindowParams(new Object[] { 40 BOUNDS, new Rectangle(-1, -1, 1, 1), 41 PARENT_WINDOW, new Long(owner.getWindow()), 42 EVENT_MASK, new Long(XConstants.FocusChangeMask | XConstants.KeyPressMask | XConstants.KeyReleaseMask)
43 })); 44 this.owner = owner; 45 } 46 47 public void postInit(XCreateWindowParams params){ 48 super.postInit(params); 49 setWMClass(getWMClass()); 50 xSetVisible(true); 51 } 52 53 protected String getWMName() { 54 return "FocusProxy"; 55 } 56 protected String[] getWMClass() { 57 return new String[] {"Focus-Proxy-Window", "FocusProxy"}; 58 } 59 60 public XWindowPeer getOwner() { 61 return owner; 62 }
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 / 25 26 package sun.awt.X11; 27 28 import java.awt.; 29 30 /** 31 * This class represent focus holder window implementation. When toplevel requests or receives focus 32 * it instead sets focus to this proxy. This proxy is mapped but invisible(it is kept at (-1,-1)) 33 * and therefore X doesn't control focus after we have set it to proxy. 34 */ 35 public class XFocusProxyWindow extends XBaseWindow { 36 XWindowPeer owner; 37 38 public XFocusProxyWindow(XWindowPeer owner) { 39 super(new XCreateWindowParams(new Object[] { 40 BOUNDS, new Rectangle(-1, -1, 1, 1), 41 PARENT_WINDOW, Long.valueOf(owner.getWindow()), 42 EVENT_MASK, Long.valueOf(XConstants.FocusChangeMask | XConstants 43 .KeyPressMask | XConstants.KeyReleaseMask) 44 })); 45 this.owner = owner; 46 } 47 48 public void postInit(XCreateWindowParams params){ 49 super.postInit(params); 50 setWMClass(getWMClass()); 51 xSetVisible(true); 52 } 53 54 protected String getWMName() { 55 return "FocusProxy"; 56 } 57 protected String[] getWMClass() { 58 return new String[] {"Focus-Proxy-Window", "FocusProxy"}; 59 } 60 61 public XWindowPeer getOwner() { 62 return owner; 63 }