changeset 4614:b6359adf1f31

7078460: JDialog is shown as separate icon on the taskbar Reviewed-by: art
author denis
date Mon, 30 Jan 2012 13:46:16 +0400
parents cd80798dc799
children 2bd0d00e8729
files src/solaris/classes/sun/awt/X11/XWindowPeer.java
diffstat 1 files changed, 14 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/solaris/classes/sun/awt/X11/XWindowPeer.java	Mon Jan 30 16:51:24 2012 +0900
+++ b/src/solaris/classes/sun/awt/X11/XWindowPeer.java	Mon Jan 30 13:46:16 2012 +0400
@@ -255,6 +255,20 @@
             }
         }
 
+        if (owner != null || isSimpleWindow()) {
+            XToolkit.awtLock();
+            try {
+                XNETProtocol protocol = XWM.getWM().getNETProtocol();
+                if (protocol != null && protocol.active()) {
+                    XAtomList net_wm_state = getNETWMState();
+                    net_wm_state.add(protocol.XA_NET_WM_STATE_SKIP_TASKBAR);
+                    setNETWMState(net_wm_state);
+                }
+            } finally {
+                XToolkit.awtUnlock();
+            }
+        }
+
          // Init warning window(for applets)
         if (((Window)target).getWarningString() != null) {
             // accessSystemTray permission allows to display TrayIcon, TrayIcon tooltip
@@ -480,14 +494,6 @@
                              bounds.x, bounds.y, bounds.width, bounds.height);
             XWM.setMotifDecor(this, false, 0, 0);
 
-            XNETProtocol protocol = XWM.getWM().getNETProtocol();
-            if (protocol != null && protocol.active()) {
-                XAtomList net_wm_state = getNETWMState();
-                net_wm_state.add(protocol.XA_NET_WM_STATE_SKIP_TASKBAR);
-                setNETWMState(net_wm_state);
-            }
-
-
             boolean isResized = !bounds.getSize().equals(oldBounds.getSize());
             boolean isMoved = !bounds.getLocation().equals(oldBounds.getLocation());
             if (isMoved || isResized) {