Re: [dev] [hack] Having dmenu provide hints about current selected entry

From: Connor Lane Smith <>
Date: Mon, 29 Nov 2010 01:44:43 +0000


On 29 November 2010 00:17, Christophe-Marie Duquesne
<> wrote:
> I rewrote my proposal with select(). Now readstdin() will return if it
> cannot read data from stdin during more than 1 u_sec. It will set the
> static flag 'eof' to 1 if it has read the end of file character. This
> way while eof is 0, you know you should call readstdin() again.

Great, it's a lot cleaner this way. One problem with this approach,
though, is that if data is written to stdin it isn't displayed until
the next X event. This is likely fine for your use case, and
dmenu_run, but perhaps not for other cases. To fix that we'd have to
select between stdin and XConnectionNumber(dc->dpy).

I've also attached a slightly neater version of your patch, plus a bugfix.


Received on Mon Nov 29 2010 - 02:44:43 CET

This archive was generated by hypermail 2.2.0 : Mon Nov 29 2010 - 02:48:03 CET