Consume mouse events less intrusively

Bug #1260719 reported by Casper Ti. Vector
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Terminator
Incomplete
Wishlist
Unassigned

Bug Description

Currently (as of trunk), terminator treats mouse events in such manner that:
1. Ctrl + left click on an URL opens it, but the event is not consumed.
2. Middle click pastes the clipboard, and the event is consumed.
3. Rightclick opens the context menu, and the event is consumed.
4. All other events are not consumed.

Behaviour 1 is slightly problematic because the meaning of the event is ambiguous, and will trigger the hook (if existing) set by the program running inside the terminal (as well as open the URL if recognised by the terminal). The best way to avoid this is to consume the event if terminator decides to open the URL, since mouse events with keyboard modifiers (like ctrl + left click) are, though supported by ncurses and perhaps others, rarely used AFAIK.

Behaviour 3 is very troublesome because this disrupts console programs that support right clicks, for example w3m. The best way to avoid this is to instead use ctrl + right click for context menu (and consume the event), which is also the practice of xterm. This blocks console programs from accessing ctrl + right click events inside terminator, but should not quite affect the overall situation since the event should be rarely used by console programs.

Attached is the patch, which modifies the behaviours in the proposed way.

BTW, it might be slightly better to add an option to enable/disable the forementioned behaviours, but I am too lazy to do that :P

Revision history for this message
Casper Ti. Vector (caspervector) wrote :
Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

I'm very unlikely to apply this. This significantly changes a fundamental existing behaviour for everybody, to please the relatively small number of people using w3m. Further, Terminator tends to follow gnome-terminal as much as is practical, and gnome-terminal also has an un-modified right-click popup menu.

The only way this would be accepted is if it came as an advanced on/off setting which by default is not active.

Changed in terminator:
status: New → Incomplete
Revision history for this message
Stephen Boddy (stephen-j-boddy) wrote :

I realise re-reading that there may be other programs that use right-click, but I don't know of them and, unless there's some very compelling examples, I'm still not applying this as it currently stands.

Revision history for this message
Casper Ti. Vector (caspervector) wrote : Re: [Bug 1260719] Re: [PATCH] Consume mouse events less intrusively

I see, I will try to make it when I have time (probably not in near
future).

On Fri, Dec 13, 2013 at 04:08:14PM -0000, Stephen Boddy wrote:
> I'm very unlikely to apply this. This significantly changes a
> fundamental existing behaviour for everybody, to please the relatively
> small number of people using w3m. Further, Terminator tends to follow
> gnome-terminal as much as is practical, and gnome-terminal also has an
> un-modified right-click popup menu.
>
> The only way this would be accepted is if it came as an advanced on/off
> setting which by default is not active.
>
> ** Changed in: terminator
> Status: New => Incomplete

--
My current OpenPGP key:
4096R/0xE18262B5D9BF213A (expires: 2017.1.1)
D69C 1828 2BF2 755D C383 D7B2 E182 62B5 D9BF 213A

Revision history for this message
Casper Ti. Vector (caspervector) wrote : Re: [PATCH] Consume mouse events less intrusively

So I think these should be what you want.

Revision history for this message
Casper Ti. Vector (caspervector) wrote :
Revision history for this message
Casper Ti. Vector (caspervector) wrote :
Revision history for this message
Egmont Koblinger (egmont-gmail) wrote :

Note that gnome-terminal recently changed the way it handles the right mouse button (https://bugzilla.gnome.org/show_bug.cgi?id=13299). If an application is interested in mouse events, it is forwarded to the app rather than bringing up the context menu. Shift+rightclick still opens the terminal's menu.

Revision history for this message
Egmont Koblinger (egmont-gmail) wrote :

(Note that it required a fix for VTE too, making this bug depend on bug 1030562).

Changed in terminator:
importance: Undecided → Wishlist
Changed in terminator:
milestone: none → 2.0
summary: - [PATCH] Consume mouse events less intrusively
+ Consume mouse events less intrusively
Revision history for this message
Egmont Koblinger (egmont-gmail) wrote :

For #3, see bug 1518700.

With newer gtk3-based vte versions, it is possible to first send the event to vte, see if it handled it, and take action based on that (e.g. if it didn't handle it then open a menu).

Changed in terminator:
milestone: 2.0 → 2.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.