equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright 2003-2007 Sun Microsystems, Inc. All Rights Reserved. |
2 * Copyright 2003-2008 Sun Microsystems, Inc. All Rights Reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Sun designates this |
7 * published by the Free Software Foundation. Sun designates this |
24 */ |
24 */ |
25 |
25 |
26 |
26 |
27 package sun.awt.X11; |
27 package sun.awt.X11; |
28 |
28 |
29 import java.awt.*; |
29 import java.awt.Frame; |
30 import java.util.logging.Level; |
30 import java.util.logging.Level; |
31 import java.util.logging.Logger; |
31 import java.util.logging.Logger; |
32 import java.util.logging.LogManager; |
32 |
33 import java.awt.*; |
33 final class XNETProtocol extends XProtocol implements XStateProtocol, XLayerProtocol |
34 import java.awt.image.*; |
34 { |
35 import java.util.*; |
35 private final static Logger log = Logger.getLogger("sun.awt.X11.XNETProtocol"); |
36 |
|
37 class XNETProtocol extends XProtocol implements XStateProtocol, XLayerProtocol { |
|
38 final static Logger log = Logger.getLogger("sun.awt.X11.XNETProtocol"); |
|
39 private final static Logger iconLog = Logger.getLogger("sun.awt.X11.icon.XNETProtocol"); |
36 private final static Logger iconLog = Logger.getLogger("sun.awt.X11.icon.XNETProtocol"); |
|
37 private static Logger stateLog = Logger.getLogger("sun.awt.X11.states.XNETProtocol"); |
40 |
38 |
41 /** |
39 /** |
42 * XStateProtocol |
40 * XStateProtocol |
43 */ |
41 */ |
44 public boolean supportsState(int state) { |
42 public boolean supportsState(int state) { |
274 return NetWindow != 0; |
272 return NetWindow != 0; |
275 } |
273 } |
276 |
274 |
277 boolean doStateProtocol() { |
275 boolean doStateProtocol() { |
278 boolean res = active() && checkProtocol(XA_NET_SUPPORTED, XA_NET_WM_STATE); |
276 boolean res = active() && checkProtocol(XA_NET_SUPPORTED, XA_NET_WM_STATE); |
|
277 stateLog.finer("doStateProtocol() returns " + res); |
279 return res; |
278 return res; |
280 } |
279 } |
281 |
280 |
282 boolean doLayerProtocol() { |
281 boolean doLayerProtocol() { |
283 boolean res = active() && checkProtocol(XA_NET_SUPPORTED, XA_NET_WM_STATE_ABOVE); |
282 boolean res = active() && checkProtocol(XA_NET_SUPPORTED, XA_NET_WM_STATE_ABOVE); |