From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.devel Subject: Re: master ad76020 1/2: Support mouse clicks on tab bar on TTY frames Date: Mon, 07 Oct 2019 00:20:32 +0200 Message-ID: <874l0lzfbj.fsf@igel.home> References: <20191006165510.22230.58295@vcs0.savannah.gnu.org> <20191006165511.71FAB206AB@vcs0.savannah.gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="70914"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) Cc: Eli Zaretskii To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Oct 07 00:21:29 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 1iHEu9-000IIU-DI for ged-emacs-devel@m.gmane.org; Mon, 07 Oct 2019 00:21:29 +0200 Original-Received: from localhost ([::1]:37246 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iHEu7-0003bO-JP for ged-emacs-devel@m.gmane.org; Sun, 06 Oct 2019 18:21:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45416) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iHEtM-0003bH-HL for emacs-devel@gnu.org; Sun, 06 Oct 2019 18:20:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iHEtL-00081t-6v for emacs-devel@gnu.org; Sun, 06 Oct 2019 18:20:40 -0400 Original-Received: from mail-out.m-online.net ([212.18.0.9]:34979) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iHEtJ-00080r-P1; Sun, 06 Oct 2019 18:20:37 -0400 Original-Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 46mdNL1JhLz1rK4D; Mon, 7 Oct 2019 00:20:34 +0200 (CEST) Original-Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 46mdNL0Qckz1qqkD; Mon, 7 Oct 2019 00:20:34 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Original-Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id s-s3-jdrOW8P; Mon, 7 Oct 2019 00:20:33 +0200 (CEST) X-Auth-Info: Cdpaog7DDotU7D8q0uR10d01jWHdVOlWeFbY+6y8TAY+muq9fc46y09HnAm7FVCz Original-Received: from igel.home (ppp-46-244-168-242.dynamic.mnet-online.de [46.244.168.242]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Mon, 7 Oct 2019 00:20:33 +0200 (CEST) Original-Received: by igel.home (Postfix, from userid 1000) id 4B7802C0D5D; Mon, 7 Oct 2019 00:20:32 +0200 (CEST) X-Yow: I have nostalgia for the late Sixties! In 1969 I left my laundry with a hippie!! During an unauthorized Tupperware party it was chopped & diced! In-Reply-To: <20191006165511.71FAB206AB@vcs0.savannah.gnu.org> (Eli Zaretskii's message of "Sun, 6 Oct 2019 12:55:10 -0400 (EDT)") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.18.0.9 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:240680 Archived-At: On Okt 06 2019, eliz@gnu.org (Eli Zaretskii) wrote: > +/* 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 > + structure, store it in keyboard queue, and return true; otherwise > + return false. MODIFIERS are event modifiers for generating the tab > + release event. */ > +bool > +tty_handle_tab_bar_click (struct frame *f, int x, int y, bool down_p, > + struct input_event *event) > +{ > + /* Did they click on the tab bar? */ > + if (y < FRAME_MENU_BAR_LINES (f) > + || y >=3D FRAME_MENU_BAR_LINES (f) + FRAME_TAB_BAR_LINES (f)) > + return false; > + > + /* Find the tab-bar item where the X,Y coordinates belong. */ > + int prop_idx; > + ptrdiff_t clen; > + Lisp_Object caption =3D tty_get_tab_bar_item (f, x, &prop_idx, &clen= ); > + > + if (NILP (caption)) > + return false; > + > + if (NILP (AREF (f->tab_bar_items, > + prop_idx * TAB_BAR_ITEM_NSLOTS + TAB_BAR_ITEM_ENABLED_P))) > + return false; > + > + if (down_p) > + f->last_tab_bar_item =3D prop_idx; That breaks no-x build: xdisp.c:13477:8: error: =E2=80=98struct frame=E2=80=99 has no member name= d =E2=80=98last_tab_bar_item=E2=80=99; did you mean =E2=80=98n_tab_bar_it= ems=E2=80=99? Andreas. --=20 Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint =3D 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC= 1 "And now for something completely different."