From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: tab-bar: Defining another mouse-button binding? Date: Sat, 11 Sep 2021 14:03:20 +0300 Message-ID: <83r1dvgyrr.fsf@gnu.org> References: <87mtoo6812.fsf@alphapapa.net> <877dfrszuf.fsf@mail.linkov.net> <87lf4651vf.fsf@alphapapa.net> <87k0jq5gkc.fsf@mail.linkov.net> <83r1dxk6a0.fsf@gnu.org> <87h7etmv86.fsf@mail.linkov.net> <83k0jpk1c8.fsf@gnu.org> <878s05lfp5.fsf@mail.linkov.net> <83h7etk08j.fsf@gnu.org> <87czph6jlg.fsf@mail.linkov.net> <83zgskj4fj.fsf@gnu.org> <87v938e80k.fsf@mail.linkov.net> <9d435ece-ea6c-5459-2471-8fc0001520e1@gmx.at> <83sfybh2n2.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15713"; mail-complaints-to="usenet@ciao.gmane.io" Cc: adam@alphapapa.net, emacs-devel@gnu.org To: rudalics@gmx.at, juri@linkov.net Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Sep 11 13:04:47 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mP0oR-0003tx-E1 for ged-emacs-devel@m.gmane-mx.org; Sat, 11 Sep 2021 13:04:47 +0200 Original-Received: from localhost ([::1]:55336 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mP0oQ-0007X5-Ck for ged-emacs-devel@m.gmane-mx.org; Sat, 11 Sep 2021 07:04:46 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37228) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mP0nK-0005rF-3L for emacs-devel@gnu.org; Sat, 11 Sep 2021 07:03:38 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:59514) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mP0nI-0001m3-0p; Sat, 11 Sep 2021 07:03:36 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1146 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mP0nH-0003g7-P8; Sat, 11 Sep 2021 07:03:35 -0400 In-Reply-To: <83sfybh2n2.fsf@gnu.org> (message from Eli Zaretskii on Sat, 11 Sep 2021 12:39:45 +0300) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:274543 Archived-At: > Date: Sat, 11 Sep 2021 12:39:45 +0300 > From: Eli Zaretskii > Cc: adam@alphapapa.net, emacs-devel@gnu.org, juri@linkov.net > > > With mouse wheel scrolls one has to be always prepared that the scroll > > is intended for one window while the mouse is positioned anywhere on > > your frame. > > That's not the problem here, AFAICT. The problem here, at least for > GUI frames, is that the code Juri wrote supports only mice that report > wheel events as button events. That code doesn't support mice which > report true mouse-wheel events (so I guess NS is also affected?). I'm > working on a fix. > > I didn't yet look at the TTY frame case. OK, I think I fixed this: tab-bar scrolling should now work for mice which report mouse-wheel events. I recalled the problem with supporting that on MS-Windows consoles: the coordinates reported by console APIs for the mouse-scroll events is relative to the top-level corner of the display screen, not that of the console window (see the comment in w32inevt.c). This, of course, make the coordinates inappropriate for detecting scrolling of the tab bar and tab line on MS-Windows consoles, so they don't work there. If someone knows how to fix this, I'm all ears.