all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: lekktu@gmail.com, emacs-devel@gnu.org
Subject: Re: Tab bar tabs landed on master
Date: Fri, 15 Nov 2019 01:37:51 +0200	[thread overview]
Message-ID: <87h83680iw.fsf@mail.linkov.net> (raw)
In-Reply-To: <83y2xuur76.fsf@gnu.org> (Eli Zaretskii's message of "Wed, 09 Oct 2019 13:51:57 +0300")

> 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) */
 
 \f
 



  parent reply	other threads:[~2019-11-14 23:37 UTC|newest]

Thread overview: 82+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-01 20:17 Tab bar tabs landed on master Juri Linkov
2019-10-01 21:43 ` Juanma Barranquero
2019-10-01 22:28   ` Juri Linkov
2019-10-01 22:35     ` Juanma Barranquero
2019-10-01 23:27     ` Ergus
2019-10-03 22:10       ` Juri Linkov
2019-10-05 21:55       ` Juri Linkov
2019-10-06 17:13         ` Eli Zaretskii
2019-10-06 18:48           ` Juri Linkov
2019-10-06 19:12             ` Eli Zaretskii
2019-10-06 19:23               ` Juri Linkov
2019-10-06 19:38                 ` Eli Zaretskii
2019-10-06 19:53                   ` Juri Linkov
2019-10-07 17:18                     ` Eli Zaretskii
2019-10-07 17:31                       ` Lars Ingebrigtsen
2019-10-07 17:49                       ` Ergus
2019-10-06 21:11                   ` Stefan Monnier
2019-10-06 21:27                     ` Juri Linkov
2019-10-06 22:53                       ` Stefan Monnier
2019-10-06 22:58                       ` add Tab to ELPA other-frame-window Stephen Leake
2019-10-07 16:07                         ` Eli Zaretskii
2019-10-07 20:14                         ` Juri Linkov
2019-10-08  7:48                           ` Eli Zaretskii
2019-10-10 22:46                             ` Juri Linkov
2019-10-11  8:10                               ` Eli Zaretskii
2019-10-19 22:07                                 ` Juri Linkov
2019-10-20  6:24                                   ` Eli Zaretskii
2019-10-20 17:37         ` Tab bar tabs landed on master Juri Linkov
2019-10-23 20:54           ` Juri Linkov
2019-10-26 22:16             ` Juri Linkov
2019-10-27 23:05               ` Juri Linkov
2019-10-23 20:59         ` Juri Linkov
2019-11-01 23:13           ` Ergus
2019-11-02  7:20             ` Eli Zaretskii
2019-11-02 11:46               ` Ergus
2019-10-02  8:55     ` martin rudalics
2019-10-02 16:30       ` Juri Linkov
2019-10-02 15:03   ` Eli Zaretskii
2019-10-02 16:27     ` Juri Linkov
2019-10-02 17:07       ` Eli Zaretskii
2019-10-02 19:55         ` Juri Linkov
2019-10-05 14:33           ` Eli Zaretskii
2019-10-05 22:07             ` Juri Linkov
2019-10-06 17:06               ` Eli Zaretskii
2019-10-07 19:15                 ` Juri Linkov
2019-10-07 19:23                   ` Eli Zaretskii
2019-10-09 10:51                     ` Eli Zaretskii
2019-10-09 18:43                       ` Juri Linkov
2019-10-09 18:59                         ` Eli Zaretskii
2020-01-11 23:57                           ` Juri Linkov
2020-01-12  3:28                             ` Eli Zaretskii
2020-01-12 23:25                               ` Juri Linkov
2020-01-13 16:49                                 ` Eli Zaretskii
2020-01-13 23:35                                   ` Juri Linkov
2020-04-18 23:56                                     ` Juri Linkov
2020-04-19 14:06                                       ` Eli Zaretskii
2019-11-14 23:37                       ` Juri Linkov [this message]
2019-11-15  8:21                         ` Eli Zaretskii
2019-10-03  8:16         ` martin rudalics
2019-10-03  8:15       ` martin rudalics
2019-10-03  3:40 ` Stefan Kangas
2019-10-03  9:02 ` Robert Pluim
2019-10-07 13:15 ` Stefan Kangas
2019-10-07 13:21 ` Stefan Kangas
2019-10-07 15:53   ` Ergus
2019-10-07 20:23     ` Juri Linkov
2019-10-07 20:58       ` Ergus
2019-10-07 21:48       ` Zach Pearson
2019-10-07 22:29         ` Juri Linkov
2019-10-08 14:29           ` Eli Zaretskii
2019-10-09 22:43             ` Juri Linkov
2019-10-10  7:52               ` Eli Zaretskii
2019-10-07 16:40   ` Eli Zaretskii
2019-10-07 20:19   ` Juri Linkov
2019-10-08  7:52     ` Eli Zaretskii
2019-10-20 22:39   ` Juri Linkov
2019-10-20 23:06     ` Ergus
2019-10-21  6:54       ` Eli Zaretskii
2019-10-21  6:43     ` Eli Zaretskii
2019-10-21 21:40       ` Juri Linkov
  -- strict thread matches above, loose matches on Subject: below --
2019-10-03 11:23 Andrii Kolomoiets
2019-10-03 12:19 ` Robert Pluim

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=87h83680iw.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=lekktu@gmail.com \
    /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.