emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master ad76020 1/2: Support mouse clicks on tab bar on TTY frames


From: Andreas Schwab
Subject: Re: master ad76020 1/2: Support mouse clicks on tab bar on TTY frames
Date: Mon, 07 Oct 2019 00:20:32 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

On Okt 06 2019, address@hidden (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, address@hidden
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]