From: Juri Linkov <juri@linkov.net>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org
Subject: Re: master ad76020 1/2: Support mouse clicks on tab bar on TTY frames
Date: Mon, 07 Oct 2019 02:02:20 +0300 [thread overview]
Message-ID: <87bluteav7.fsf@mail.linkov.net> (raw)
In-Reply-To: <874l0lzfbj.fsf@igel.home> (Andreas Schwab's message of "Mon, 07 Oct 2019 00:20:32 +0200")
>> +/* 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 >= 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 = 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 = prop_idx;
>
> That breaks no-x build:
>
> xdisp.c:13477:8: error: ‘struct frame’ has no member named ‘last_tab_bar_item’; did you mean ‘n_tab_bar_items’?
Maybe Eli has a better fix, but at least now I fixed compilation to not fail.
next prev parent reply other threads:[~2019-10-06 23:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20191006165510.22230.58295@vcs0.savannah.gnu.org>
[not found] ` <20191006165511.71FAB206AB@vcs0.savannah.gnu.org>
2019-10-06 22:20 ` master ad76020 1/2: Support mouse clicks on tab bar on TTY frames Andreas Schwab
2019-10-06 23:02 ` Juri Linkov [this message]
2019-10-07 16:08 ` Eli Zaretskii
2019-10-07 16:07 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bluteav7.fsf@mail.linkov.net \
--to=juri@linkov.net \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=schwab@linux-m68k.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.