all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Andreas Schwab <schwab@linux-m68k.org>
To: emacs-devel@gnu.org
Cc: Eli Zaretskii <eliz@gnu.org>
Subject: Re: master ad76020 1/2: Support mouse clicks on tab bar on TTY frames
Date: Mon, 07 Oct 2019 00:20:32 +0200	[thread overview]
Message-ID: <874l0lzfbj.fsf@igel.home> (raw)
In-Reply-To: <20191006165511.71FAB206AB@vcs0.savannah.gnu.org> (Eli Zaretskii's message of "Sun, 6 Oct 2019 12:55:10 -0400 (EDT)")

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 >= 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’?

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."



       reply	other threads:[~2019-10-06 22:20 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   ` Andreas Schwab [this message]
2019-10-06 23:02     ` master ad76020 1/2: Support mouse clicks on tab bar on TTY frames Juri Linkov
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=874l0lzfbj.fsf@igel.home \
    --to=schwab@linux-m68k.org \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.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.