From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: Tab bar tabs landed on master Date: Fri, 15 Nov 2019 01:37:51 +0200 Organization: LINKOV.NET Message-ID: <87h83680iw.fsf@mail.linkov.net> 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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="63684"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) Cc: lekktu@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 15 01:11:41 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 1iVPDA-000GRJ-6i for ged-emacs-devel@m.gmane.org; Fri, 15 Nov 2019 01:11:40 +0100 Original-Received: from localhost ([::1]:34622 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iVPD9-0006no-0J for ged-emacs-devel@m.gmane.org; Thu, 14 Nov 2019 19:11:39 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54446) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iVPCN-0006nU-GR for emacs-devel@gnu.org; Thu, 14 Nov 2019 19:10:52 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iVPCM-00041c-FA for emacs-devel@gnu.org; Thu, 14 Nov 2019 19:10:51 -0500 Original-Received: from blue.elm.relay.mailchannels.net ([23.83.212.20]:39469) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iVPCK-00040x-Qf; Thu, 14 Nov 2019 19:10:49 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 4E1B26A144F; Fri, 15 Nov 2019 00:10:47 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a61.g.dreamhost.com (100-96-8-64.trex.outbound.svc.cluster.local [100.96.8.64]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id DB82E6A1445; Fri, 15 Nov 2019 00:10:46 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a61.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.18.5); Fri, 15 Nov 2019 00:10:47 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Robust-Chemical: 732a905e71c4c4d4_1573776647129_1569296622 X-MC-Loop-Signature: 1573776647128:53591659 X-MC-Ingress-Time: 1573776647128 Original-Received: from pdx1-sub0-mail-a61.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a61.g.dreamhost.com (Postfix) with ESMTP id A8D7983954; Thu, 14 Nov 2019 16:10:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=9WdhhAq5qFYZlIu+PEHtETS4AAE=; b= B+7LwztTwbLT+O3UWF0uYGdXM6+N2YgdgP3Gu29+WrZfgsnxBgld0SLOqFsIWJjz PM0baJORmlJINaklDU3ApuAAywzmxEdbfmOLO/kj0rDMBQ51UKu5bFyPQM/uXmi9 KOF9bh1uZVdyNk6aFRLRQ96zxb9AIRnhPuvpCH6fI7M= Original-Received: from mail.jurta.org (m91-129-102-1.cust.tele2.ee [91.129.102.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a61.g.dreamhost.com (Postfix) with ESMTPSA id C31CA83943; Thu, 14 Nov 2019 16:10:39 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a61 In-Reply-To: <83y2xuur76.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 09 Oct 2019 13:51:57 +0300") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 23.83.212.20 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:242213 Archived-At: > It is possible that we will need to force reset of up_modifier bit > from the event modifiers inside tty_handle_tab_bar_click, I'm not > sure. If you get error messages when clicking on the tab bar saying > something like " is undefined", this is the > reason. > > 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. What condition should be added to use tty_handle_tab_bar_click in term.c? Maybe HAVE_GPM? Is this change correct? diff --git a/src/xdisp.c b/src/xdisp.c index 320e0731de..5ff69bcc77 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -13437,7 +13437,7 @@ tty_get_tab_bar_item (struct frame *f, int x, int *idx, ptrdiff_t *end) return Qnil; } -#if defined HAVE_NTGUI && !defined CYGWIN +#if defined HAVE_GPM || (defined HAVE_NTGUI && !defined CYGWIN) /* Handle a mouse click at X/Y on the tab bar of TTY frame F. If the click was on the tab bar and was handled, populate the EVENT @@ -13501,7 +13501,7 @@ tty_handle_tab_bar_click (struct frame *f, int x, int y, bool down_p, return true; } -#endif /* HAVE_NTGUI && !CYGWIN */ +#endif /* HAVE_GPM || (HAVE_NTGUI && !CYGWIN) */