<div dir="ltr"><div class="gmail_default" style="font-size:small">This is what I use for checking for _NET_WM_WINDOW_TYPE_DIALOG atoms:<br><br><span style="font-family:monospace">import Foreign.C.Types (CLong)<br><br>checkDialog :: Query Bool<br>checkDialog = checkAtom "_NET_WM_WINDOW_TYPE" "_NET_WM_WINDOW_TYPE_DIALOG"<br><br>checkAtom :: String -> String -> Query Bool<br>checkAtom name value = ask >>= \w -> liftX $ do<br>                a <- getAtom name<br>                val <- getAtom value<br>                mbr <- getProp w a<br>                case mbr of<br>                  Just [r] -> return $ elem (fromIntegral r) [val]<br>                  _ -> return False<br><br>-- | Helper to read a property<br>getProp :: Window -> Atom -> X (Maybe [CLong])<br>getProp w a = withDisplay $ \dpy -> io $ getWindowProperty32 dpy a w<br></span><br></div><div class="gmail_default" style="font-size:small">You would probably change <font face="monospace">checkDialog <font face="arial,helvetica,sans-serif">to use <font face="monospace">checkAtom "_NET_WM_STATE" "_NET_WM_STATE_ABOVE"</font></font></font><br></div><div class="gmail_default" style="font-size:small">I would credit the original author I stole this from, but I can't seem to find it again.<br><br></div><div class="gmail_default" style="font-size:small">Hope this helps and isn't simply reproducing what you've already tried :)<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 11, 2014 at 11:21 AM, Chris Bell <span dir="ltr"><<a href="mailto:cwbell@mail.usf.edu" target="_blank">cwbell@mail.usf.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi, all<br><br>I was wondering, how could I set a window to float based on its atomic window properties? I'm running Xmonad raw on top of X on Fedora 20; no DE. According to xprop, the only 'special' property of this window is:<div><br>_NET_WM_STATE(ATOM) = _NET_WM_STATE_ABOVE, _NET_WM_STATE_STICKY<br><br>particularly the STATE_ABOVE property. So far, I haven't found a reliable way to extract and check if this property exists is set within a mange hook. I've tried pulling the entire property as a stringProperty - and later as an atomic using getAtom - and looking for my string with IsInfixOf (but I think that was pretty misguided, since it wouldn't compile), and I've tried checking against:<div><br></div><div>( isInProperty "_NET_WM_STATE" "_NET_WM_STATE_ABOVE" )</div><div><br></div><div>and have also tried it with "_NET_WM_STATE(ATOM)". I don't get any compile errors, but... it doesn't automatically  float the windows, either. I apologize if it's something simple I'm overlooking - I've found the Haskell difficulty curve to be more extreme than any other language I've worked with. With the possible exception of Matlab.</div><div><br></div><div><div>  The window is one of those fancy special new "panel" not-windows that Chrome is implementing; it's for the Hangouts extension with 'enable panels' turned on in chrome://flags/#enable-panels. They're frustrating, because Chrome can actually handle them as dockable internal window, docking them at the bottom of the browser. Or it can be handled by the OS WM. All of the window properties are identical to a normal Chrome window, except the STATE_ABOVE flag, so that's all I can think to use. </div><div><br></div><div>Any suggestions are more than welcome.</div><div><br></div><div>Regards,<br><div><br>Chris Bell<br><br>Ph.D. Candidate, Teaching Assistant, Gentleman, Scholar, Penguin Wrangler<br>University of South Florida<br>College of Engineering<br>Department of Computer Science and Engineering<br>NarMOS Research Team, Official Daemon Charmer</div></div></div></div></div>
<br>_______________________________________________<br>
xmonad mailing list<br>
<a href="mailto:xmonad@haskell.org">xmonad@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/xmonad" target="_blank">http://www.haskell.org/mailman/listinfo/xmonad</a><br>
<br></blockquote></div><br></div>