[Top][All Lists]

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

Re: Tab bar tabs landed on master

From: Eli Zaretskii
Subject: Re: Tab bar tabs landed on master
Date: Sun, 06 Oct 2019 20:06:16 +0300

> From: Juri Linkov <address@hidden>
> Cc: address@hidden,  address@hidden
> Date: Sun, 06 Oct 2019 01:07:54 +0300
> > Can you explain how tab-bar-handle-mouse is supposed to work on TTY
> > frames with a mouse?  It doesn't work for me on the MS-Windows
> > console: I get "<nil> <mouse-1> is undefined".  Which makes sense to
> > me, as I don't see any code which would generate a TAB_BAR_EVENT event
> > on a TTY, so I thought I need to write code to implement that in the
> > TTY case.  However, the doc string of tab-bar-handle-mouse seems to
> > imply that I'm missing something.
> tab-bar-make-keymap-1 binds '(keymap (mouse-1 . tab-bar-handle-mouse))
> that on TTY frames accepts mouse clicks anywhere on the tab bar,
> and then tab-bar-handle-mouse finds the clicked tab.
> > Did you try the code on TTY frames with some mouse capability, and if
> > so, what was your configuration?
> On TTY frames on GNU/Linux the code works well after enabling
> xterm-mouse-mode.

That means platforms that support TTY mouse on the C level (GPM and
MS-Windows/MS-DOS) will not be able to invoke tab-bar commands with a
mouse, because there's no code that would produce the relevant events
Emacs expects.  xt-mouse bypasses the normal channels of feeding mouse
events to the event queue, so implementation that works with xt-mouse
alone generally doesn't produce the infrastructure required by "real"
mouse support on TTY frames.

> I tried to test it on MS-Windows too, but can't figure out how to
> enable mouse on the MS-Windows console.  I was able to run 'emacs
> -nw' only on winpty.  Could you suggest how mouse could be enabled
> on the MS-Windows console?

It is enabled by default.  Maybe your cmd window has the Quick Edit
mode enabled, in which case mouse events are not reported to console
applications, but instead handled by Windows.  I have now installed
code to disable Quick Edit when Emacs starts, so you shouldn't need to
do that persistently (this option can be controlled in the Properties
of the cmd window).

I also installed support for mouse gestures on the tab bar on
text-mode frames.  It currently only works on MS-Windows, but should
be easy to extend to GPM as well.  Do you have access to a system with
a GPM-capable console, and can compile Emacs with GPM support?  If so,
I will send a patch for you to try (I don't myself have access to such
a system, so I cannot try it myself).


reply via email to

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