From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Tab bar tabs landed on master Date: Fri, 15 Nov 2019 10:21:23 +0200 Message-ID: <835zjl4kjg.fsf@gnu.org> References: <8736gci5jn.fsf@mail.linkov.net> <83muej8a0f.fsf@gnu.org> <87zhijqfys.fsf@mail.linkov.net> <834l0r84at.fsf@gnu.org> <87bluyj51u.fsf@mail.linkov.net> <838spz45zc.fsf@gnu.org> <87a7aex2v9.fsf@mail.linkov.net> <83k19h3it3.fsf@gnu.org> <87sgo4tlic.fsf@mail.linkov.net> <83blusz7ec.fsf@gnu.org> <83y2xuur76.fsf@gnu.org> <87h83680iw.fsf@mail.linkov.net> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="144105"; mail-complaints-to="usenet@blaine.gmane.org" Cc: lekktu@gmail.com, emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 15 09:22:15 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iVWrs-000bKA-3F for ged-emacs-devel@m.gmane.org; Fri, 15 Nov 2019 09:22:12 +0100 Original-Received: from localhost ([::1]:36584 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iVWrq-0001Nu-UC for ged-emacs-devel@m.gmane.org; Fri, 15 Nov 2019 03:22:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42497) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iVWrL-0001Nk-0G for emacs-devel@gnu.org; Fri, 15 Nov 2019 03:21:40 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:40956) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iVWrK-0004M2-O7; Fri, 15 Nov 2019 03:21:38 -0500 Original-Received: from [176.228.60.248] (port=4244 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iVWrK-0005xq-2S; Fri, 15 Nov 2019 03:21:38 -0500 In-reply-to: <87h83680iw.fsf@mail.linkov.net> (message from Juri Linkov on Fri, 15 Nov 2019 01:37:51 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:242218 Archived-At: > From: Juri Linkov > Cc: lekktu@gmail.com, emacs-devel@gnu.org > Date: Fri, 15 Nov 2019 01:37:51 +0200 > > > diff --git a/src/term.c b/src/term.c > > index 6420105..b60484e 100644 > > --- a/src/term.c > > +++ b/src/term.c > > @@ -2568,6 +2568,14 @@ handle_one_term_event (struct tty_display_info *tty, Gpm_Event *event, > > else { > > f->mouse_moved = 0; > > term_mouse_click (&ie, event, f); > > + if (tty_handle_tab_bar_click (f, event->x, event->y, > > + (ie.modifiers & down_modifier) != 0, &ie)) > > + { > > + /* tty_handle_tab_bar_click stores 2 events in the event > > + queue, so we are done here. */ > > + count += 2; > > + return count; > > + } > > } > > > > done: > > I'm still trying to implement this, but after yesterday's commit 2241f7ca7ad, > compilation fails with > > emacs/src/term.c:2571: undefined reference to `tty_handle_tab_bar_click' > > Not sure why `tty_handle_tab_bar_click' should be defined > only with HAVE_NTGUI && !CYGWIN. It was a mistake to do that, and I've reverted that part. It should compile for you now. > What condition should be added to use tty_handle_tab_bar_click in term.c? > Maybe HAVE_GPM? Is this change correct? There should be no condition at all. This function is needed by any build that supports the mouse on TTY frames, and that means all the platforms we support, at least potentially.