wmii

git clone git://oldgit.suckless.org/wmii/
Log | Files | Refs | README | LICENSE

commit 67c0cfbd9b073b2aa6266d5894fd1f9c94050ab7
parent e9a88a2b14977d5f6e96548089faf3823c785e43
Author: Sander van Dijk <sander@wmii.de>
Date:   Tue, 28 Feb 2006 00:12:12 +0100

wmiir: do an explicit empty write when stdin is empty; this makes
it possible to for instance clear the bar by doing 'echo -n "" | wmiir write /bar/2/data'.
This makes sure that the bar is cleared when a window with no title is selected, instead of
retaining the title of the previously selected window.


Diffstat:
cmd/wmiir.c | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/cmd/wmiir.c b/cmd/wmiir.c @@ -39,6 +39,11 @@ write_data(unsigned int fid) } offset += len; } + + if(offset == 0) /* do an explicit empty write when no writing has been done yet */ + if (ixp_client_write(&c, fid, offset, 0, 0) != 0) + fprintf(stderr, "wmiir: cannot write file: %s\n", c.errstr); + free(data); }