<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Dec 10, 2013 at 12:24 PM, EatsKittens <span dir="ltr"><<a href="mailto:temporalabstraction@gmail.com" target="_blank">temporalabstraction@gmail.com</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"><div>where root in the Win record is derived from:</div><div><br></div><div><div> (root, parent, _) </div>
<div>      <- Xlib.Extras.queryTree d xid;</div></div></div></blockquote><div><br></div><div>That looks like it should be the right one, but normally I'd just get the root window of the default Screen.</div><div><br>
</div><div>For what it's worth, I see one issue: setClientMessageEvent does only the basic information necessary for a client message, which is insufficient for the _NET_ACTIVE_WINDOW message. (It's missing the client active window, which in this case should probably be 0 anyway so it may not be an issue that it's missing.)</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div></div><div>The code compiles and type checks, it just doesn't... work, it does nothing. Replacing the code with:</div>

<div><br></div><div><div>  raiseWin w = </div><div>    System.Process.rawSystem "xdotool" ["windowactivate", show x] >> return () where {</div><div>      x = xid w;</div><div>    } </div></div><div>

<br></div><div>Makes it work without errors, inspecting the code of xdotool makes it reveal to use the "_NET_ACTIVE_WINDOW" client message to the root hole? Any idea what I could be doing wrongly, is this the correct root window?</div>
</div></blockquote><div><br></div><div>You might use something like xtrace/xscope/xmon to make sure that xdotool and your program are actually sending the same client message.</div></div><div><br></div>-- <br><div dir="ltr">
<div>brandon s allbery kf8nh                               sine nomine associates</div><div><a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a>                                  <a href="mailto:ballbery@sinenomine.net" target="_blank">ballbery@sinenomine.net</a></div>
<div>unix, openafs, kerberos, infrastructure, xmonad        <a href="http://sinenomine.net" target="_blank">http://sinenomine.net</a></div></div>
</div></div>