2006-04-14 Peter Dennis Bartok <pbartok@novell.com>
authorPeter Dennis Bartok <pbartok@mono-cvs.ximian.com>
Fri, 14 Apr 2006 17:54:25 +0000 (17:54 -0000)
committerPeter Dennis Bartok <pbartok@mono-cvs.ximian.com>
Fri, 14 Apr 2006 17:54:25 +0000 (17:54 -0000)
* XplatUIX11.cs: Improved distinguishing between window types to
  tell the WM a type closer to what the app wants (Fixes #78107)

svn path=/trunk/mcs/; revision=59494

mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs

index b8520364842b01043670d4c2e95158b125c08c08..c42b7ed180073df7d39c9601948eeaf956c66a4e 100644 (file)
@@ -1,3 +1,8 @@
+2006-04-14  Peter Dennis Bartok  <pbartok@novell.com>
+
+       * XplatUIX11.cs: Improved distinguishing between window types to
+         tell the WM a type closer to what the app wants (Fixes #78107)
+
 2006-04-14  Alexander Olk  <alex.olk@googlemail.com>
 
        * ThemeWin32Classic.cs: Fixed drawing of ContainerGrabHandle and
index 933b00b7ffdef6c35e97841ec1cfa0ddbb06355f..ee10008e05d63b998ba4b1eb945dd3a0d092efe7 100644 (file)
@@ -757,7 +757,13 @@ namespace System.Windows.Forms {
 
                                if (transient) {
                                        atom_count = 0;
-                                       atoms[atom_count++] = atoms[atom_count++] = NetAtoms[(int)NA._NET_WM_WINDOW_TYPE_DOCK].ToInt32();
+                                       if ((cp.ExStyle & ((int)WindowExStyles.WS_EX_TOOLWINDOW)) != 0) {
+                                               atoms[atom_count++] = atoms[atom_count++] = NetAtoms[(int)NA._NET_WM_WINDOW_TYPE_TOOLBAR].ToInt32();
+                                       } else if (decorations == 0) {
+                                               atoms[atom_count++] = atoms[atom_count++] = NetAtoms[(int)NA._NET_WM_WINDOW_TYPE_DOCK].ToInt32();
+                                       } else {
+                                               atoms[atom_count++] = atoms[atom_count++] = NetAtoms[(int)NA._NET_WM_WINDOW_TYPE_DIALOG].ToInt32();
+                                       }
                                        XChangeProperty(DisplayHandle, hwnd.whole_window, NetAtoms[(int)NA._NET_WM_WINDOW_TYPE], (IntPtr)Atom.XA_ATOM, 32, PropertyMode.Replace, atoms, atom_count);
                                }