From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=DATE_IN_PAST_12_24 autolearn=no autolearn_force=no version=3.4.4 Received: (qmail 8031 invoked from network); 25 Apr 2021 00:57:57 -0000 Received: from 1ess.inri.net (216.126.196.35) by inbox.vuxu.org with ESMTPUTF8; 25 Apr 2021 00:57:57 -0000 Received: from duke.felloff.net ([216.126.196.34]) by 1ess; Sat Apr 24 07:17:35 -0400 2021 Message-ID: <612056122B52483B2FA47471CDE806EA@felloff.net> Date: Sat, 24 Apr 2021 13:17:23 +0200 From: cinap_lenrek@felloff.net To: 9front@9front.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: browser database TOR over TOR GPU cloud Subject: Re: [9front] focus bug in libdraw program Reply-To: 9front@9front.org Precedence: bulk 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