6735584: XNETProtocol:setStateHelper() produces bad _NET_WM_STATE messages
authorart
Tue, 12 Aug 2008 12:00:46 +0400
changeset 1189 ee54b5ce2113
parent 1188 44c63c47def9
child 1190 f27065d0d9f0
child 1957 1da46e48ada5
6735584: XNETProtocol:setStateHelper() produces bad _NET_WM_STATE messages Reviewed-by: yan
jdk/src/solaris/classes/sun/awt/X11/XNETProtocol.java
--- a/jdk/src/solaris/classes/sun/awt/X11/XNETProtocol.java	Fri Aug 08 03:32:34 2008 -0700
+++ b/jdk/src/solaris/classes/sun/awt/X11/XNETProtocol.java	Tue Aug 12 12:00:46 2008 +0400
@@ -189,6 +189,8 @@
                 req.set_format(32);
                 req.set_data(0, (!set) ? _NET_WM_STATE_REMOVE : _NET_WM_STATE_ADD);
                 req.set_data(1, state.getAtom());
+                // Fix for 6735584: req.data[2] must be set to 0 when only one property is changed
+                req.set_data(2, 0);
                 log.log(Level.FINE, "Setting _NET_STATE atom {0} on {1} for {2}", new Object[] {state, window, Boolean.valueOf(set)});
                 XToolkit.awtLock();
                 try {