[Haskell-cafe] XEventPtr in Xlib?

Brandon Allbery allbery.b at gmail.com
Tue Dec 10 18:03:15 UTC 2013


On Tue, Dec 10, 2013 at 12:24 PM, EatsKittens <temporalabstraction at gmail.com
> wrote:

> where root in the Win record is derived from:
>
>  (root, parent, _)
>       <- Xlib.Extras.queryTree d xid;
>

That looks like it should be the right one, but normally I'd just get the
root window of the default Screen.

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.)


> The code compiles and type checks, it just doesn't... work, it does
> nothing. Replacing the code with:
>
>   raiseWin w =
>     System.Process.rawSystem "xdotool" ["windowactivate", show x] >>
> return () where {
>       x = xid w;
>     }
>
> 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?
>

You might use something like xtrace/xscope/xmon to make sure that xdotool
and your program are actually sending the same client message.

-- 
brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com                                  ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20131210/66607f9f/attachment.html>


More information about the Haskell-Cafe mailing list