emacs-devel
[Top][All Lists]
Advanced

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

Re: Tab bar tabs landed on master


From: Juri Linkov
Subject: Re: Tab bar tabs landed on master
Date: Fri, 15 Nov 2019 01:37:51 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)

> 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 "<tab-bar> <up-current-tab> 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) */
 
 
 



reply via email to

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