9front - general discussion about 9front
 help / color / mirror / Atom feed
From: cinap_lenrek@felloff.net
To: 9front@9front.org
Subject: Re: [9front] focus bug in libdraw program
Date: Sat, 24 Apr 2021 13:17:23 +0200	[thread overview]
Message-ID: <612056122B52483B2FA47471CDE806EA@felloff.net> (raw)
In-Reply-To: <CAO+DOcoJMtyGVvL70a0PmZYJP=rPHhrt0D0yhaevm50VzKrutA@mail.gmail.com>

Interesting. What about we just force the buttons to 0
when a window looses its focus?

It makes sense to me as theres no way to get the button up
when the window is not in focus.

We also probably want to set wctlready to produce a event
in the wctl file in this case.

diff -r 9c76e0d472ba sys/src/cmd/rio/wind.c
--- a/sys/src/cmd/rio/wind.c	Wed Apr 21 16:58:27 2021 +0200
+++ b/sys/src/cmd/rio/wind.c	Sat Apr 24 13:13:59 2021 +0200
@@ -1380,6 +1380,10 @@
 			Channel *c = p;
 			input = recvp(c);
 			sendp(c, w);
+
+			w->mc.buttons = 0;
+			w->mouse.counter++;
+			w->wctlready = 1;
 		}
 		if(w->i==nil || Dx(w->screenr)<=0)
 			break;

--
cinap

  reply	other threads:[~2021-04-25  0:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-14  6:03 telephil9
2021-04-22 15:26 ` istvan bak
2021-04-24 11:17   ` cinap_lenrek [this message]
2021-04-25 17:25     ` istvan bak
2021-04-26  5:04     ` telephil9

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=612056122B52483B2FA47471CDE806EA@felloff.net \
    --to=cinap_lenrek@felloff.net \
    --cc=9front@9front.org \
    /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).