From: "David Leimbach" <leimy2k@gmail.com>
To: "Fans of the OS Plan 9 from Bell Labs" <9fans@cse.psu.edu>
Subject: Re: [9fans] winwatch
Date: Tue, 2 Jan 2007 14:34:28 -0800 [thread overview]
Message-ID: <3e1162e60701021434x2b4645lbadc2eb581264c47@mail.gmail.com> (raw)
In-Reply-To: <5ae4abb1c9261dbdfe9e4828d5620e27@proxima.alt.za>
I implemented hide once, then decided I didn't need it :-). So did a
few other people.
And given your comment about communicating with mice is probably well
warranted :-)
See: http://research.microsoft.com/Users/luca/Papers/Squeak.pdf
On 1/1/07, lucio@proxima.alt.za <lucio@proxima.alt.za> wrote:
> I replaced the code in click() with the following to add a half-baked
> facility to hide a window with winwatch. It uses the B3-B1 chord, but
> somehow loses the ability to pick a window with B3 when the winwatch
> window is not active.
>
> void
> click(Mouse m)
> {
> int fd, w, b = m.buttons;
> Point xy = m.xy;
> char buf[128];
>
> do
> m = emouse();
> while(m.buttons == b);
>
> while (b) {
> for(w = 0; w < nwin; w++)
> if(ptinrect(xy, win[w].r))
> break;
> if(w < nwin) {
> sprint(buf, "/dev/wsys/%d/wctl", win[w].n);
> switch (b & 7) {
> case 1:
> break;
> case 2:
> case 3:
> break;
> case 4:
> case 6:
> case 7:
> if((fd = open(buf, OWRITE)) < 0)
> return;
> write(fd, "unhide\n", 7);
> write(fd, "top\n", 4);
> write(fd, "current\n", 8);
> close(fd);
> break;
> case 5:
> if((fd = open(buf, OWRITE)) < 0)
> return;
> write(fd, "top\n", 4);
> write(fd, "hide\n", 7);
> close(fd);
> break;
> }
> }
> b = m.buttons;
> xy = m.xy;
> do {
> m = emouse();
> } while (m.buttons);
> }
> }
>
> I am a little disappointed as to how complicated it is to implement
> mouse functionality. It seems a lot easier to expect the interactive
> human to recover from unexpected conditions rather than try to design
> the interaction so no condition is unexpected. This is not a
> criticism of Plan 9, far from it. It is the realisation that by
> putting a computer on every desk we (computer programmer, glorified or
> otherwise) have turned computers from convenient slaves to eliminate
> tedium to instruments requiring constant human attention.
>
> ++L
>
>
next prev parent reply other threads:[~2007-01-02 22:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-01 8:55 lucio
2007-01-02 22:34 ` David Leimbach [this message]
2007-01-03 4:02 ` lucio
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3e1162e60701021434x2b4645lbadc2eb581264c47@mail.gmail.com \
--to=leimy2k@gmail.com \
--cc=9fans@cse.psu.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).