
Quoting Brandon Allbery
Daniel's solution has the potential for problems, because xmonad's main loop isn't processing events while it's running. (This is a common problem
Can you suggest a way to manifest this problem? I tried a bunch of stuff (shift+insert, middle-clicking on dmenu, middle-clicking outside of dmenu, hitting ctrl-c), and none of it hung xmonad; what else can I try? Anyway, my understanding of the putSelection problem was that xmonad made two threads, both making X calls, and this was the problem; the solution I posted uses two processes (not threads). Furthermore, xmonad-contrib module XMonad.Util.Dmenu defines functions whose source I basically copied and pasted to write my code snippet (but they don't allow custom prompt strings). If there's a danger when using them, that danger NEEDS to be added to the documentation. ~d