This is the mail archive of the cygwin-xfree mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

multiwindow support for _NET_WM_STATE_SKIP_TASKBAR


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Jon,

Following up on our discussion about multiwindow not honouring
_NET_WM_STATE_SKIP_TASKBAR.  The attached patch was what I had in mind
but it has no effect.  I'm posting this now to at least start the
discussion.

You may wish to refer to the FD.o EWMH specs:

http://standards.freedesktop.org/wm-spec/wm-spec-1.4.html


Yaakov
Cygwin/X
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEAREIAAYFAkkmKYsACgkQpiWmPGlmQSNVZQCg5FHvuDl4cn6scVlndMp++0DV
BHsAnikRuQrb0VrBwX4vjxJy7e5+pL55
=wazS
-----END PGP SIGNATURE-----
Process _NET_WM_STATE_SKIP_TASKBAR in multiwindow.

FIXME: This does NOT work yet.


--- origsrc/xorg-server-1.5.3/hw/xwin/winmultiwindowwm.c	2008-11-18 00:15:45.825463100 -0600
+++ src/xorg-server-1.5.3/hw/xwin/winmultiwindowwm.c	2008-11-18 13:19:41.949202900 -0600
@@ -1470,6 +1470,8 @@
 #define HINT_BORDER	(1L<<1)
 #define HINT_SIZEBOX	(1l<<2)
 #define HINT_CAPTION	(1l<<3)
+/* Windows extended window styles */
+#define HINT_SKIPTASKBAR	(1L<<0)
 /* These two are used on their own */
 #define HINT_MAX	(1L<<0)
 #define HINT_MIN	(1L<<1)
@@ -1480,7 +1482,7 @@
   static Atom	windowState, motif_wm_hints, windowType;
   Atom		type, *pAtom = NULL;
   int 		format;
-  unsigned long	hint = 0, maxmin = 0, rcStyle, nitems = 0 , left = 0;
+  unsigned long	hint = 0, exHint = 0, maxmin = 0, rcStyle, nitems = 0 , left = 0;
   WindowPtr	pWin = GetProp (hWnd, WIN_WINDOW_PROP);
 
   if (!hWnd) return;
@@ -1491,16 +1493,18 @@
   if (windowType == None) windowType = XInternAtom(pDisplay, "_NET_WM_WINDOW_TYPE", False);
 
   if (XGetWindowProperty(pDisplay, iWindow, windowState, 0L,
-			 1L, False, XA_ATOM, &type, &format,
+			 2L, False, XA_ATOM, &type, &format,
 			 &nitems, &left, (unsigned char **)&pAtom) == Success)
   {
-    if (pAtom && nitems == 1)
+    if (pAtom && nitems > 0)
     {
-      static Atom hiddenState, fullscreenState, belowState, aboveState;
+      static Atom skiptaskbarState, hiddenState, fullscreenState, belowState, aboveState;
+      if (skiptaskbarState == None) skiptaskbarState = XInternAtom(pDisplay, "_NET_WM_STATE_SKIP_TASKBAR", False);
       if (hiddenState == None) hiddenState = XInternAtom(pDisplay, "_NET_WM_STATE_HIDDEN", False);
       if (fullscreenState == None) fullscreenState = XInternAtom(pDisplay, "_NET_WM_STATE_FULLSCREEN", False);
       if (belowState == None) belowState = XInternAtom(pDisplay, "_NET_WM_STATE_BELOW", False);
       if (aboveState == None) aboveState = XInternAtom(pDisplay, "_NET_WM_STATE_ABOVE", False);
+      if (*pAtom == skiptaskbarState) exHint |= HINT_SKIPTASKBAR;
       if (*pAtom == hiddenState) maxmin |= HINT_MIN;
       else if (*pAtom == fullscreenState) maxmin |= HINT_MAX;
       if (*pAtom == belowState) *zstyle = HWND_BOTTOM;
@@ -1573,6 +1577,9 @@
 			((hint & HINT_SIZEBOX) ? (GetParent(hWnd) ? 0 : WS_SIZEBOX) : 0) |
 			((hint & HINT_CAPTION) ? WS_CAPTION : 0));
 
+  if (exHint & HINT_SKIPTASKBAR)
+    SetWindowLongPtr (hWnd, GWL_EXSTYLE, GetWindowLongPtr(hWnd, GWL_EXSTYLE) & ~WS_EX_APPWINDOW);
+
   return;
 }
 

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]