! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Add mouse-wheel binding for zoom
Status:
RESOLVED: FIXED
Severity:
enhancement
Product:
Xfce4-terminal
Component:
General

Comments

Description Kalin KOZHUHAROV 2016-09-22 06:34:30 CEST
Recently a new feature to zoom the font of the terminal was added (bug #5605).

It would be great to extend that functionality and attach the zoom-{in,out} functionality to Ctrl+{button4,button5} so it works similar to a browser.

While I don't often use the mouse on a terminal, showing a terminal on a projector screen for some demo often requires it.

(due to request filing a new RFE)
Comment 1 Igor editbugs 2016-09-22 11:12:41 CEST
The feature has been added with commit https://git.xfce.org/apps/xfce4-terminal/commit/?id=3001ce916ba7c5f3bb71add3df76681357e7bc9b

I have a feeling, however, that a setting that would control the feature might be wanted. What do you think? Some users could wish to disable it.
Comment 2 Kalin KOZHUHAROV 2016-09-22 16:32:59 CEST
That was quick, thank you!
I will try to get the git version testing in the next few days.

I guess having a preference is a good idea, may be under Advanced|Shortcuts?
Or is there any system (GTK) specific way to turn on/off such features?

I bet someone somewhere will find a console app that uses the same mouse events for something ;-)
Comment 3 Egmont Koblinger 2016-09-22 17:01:24 CEST
(In reply to Kalin KOZHUHAROV from comment #2)

> I bet someone somewhere will find a console app that uses the same mouse
> events for something ;-)

The action could be disabled (or tied to a more complex shortcut, e.g. Shift+Ctrl+scroll (*)) if the app running inside is interested in mouse events, similarly to how right clicking is handled.

(*) Most vte-based apps still present the context menu on Shift+rightclick even if the app is interested in mouse events; similarly to how vte (it's a built-in thing I think) grabs Shift+leftclick for highlighting text and does not deliver it to the app. xfce4-terminal, however, delivers Shift+rightclick to the app. It might make sense to modify this to match other apps, and it also might make sense to make these two things (rightclick as well as scrollzooming) work similarly to each other in this regard.
Comment 4 Igor editbugs 2016-09-22 17:21:25 CEST
> (In reply to Kalin KOZHUHAROV from comment #2)
> (*) Most vte-based apps still present the context menu on Shift+rightclick
> even if the app is interested in mouse events; similarly to how vte (it's a
> built-in thing I think) grabs Shift+leftclick for highlighting text and does
> not deliver it to the app. xfce4-terminal, however, delivers
> Shift+rightclick to the app. It might make sense to modify this to match
> other apps, and it also might make sense to make these two things
> (rightclick as well as scrollzooming) work similarly to each other in this
> regard.
I'm seeing context menu popping up on shift + right click in xfce4-terminal, similarly to gnome-terminal. How did you figure out that it's passed to an app?
Comment 5 Igor editbugs 2016-09-22 17:21:56 CEST
(In reply to Kalin KOZHUHAROV from comment #2)
> That was quick, thank you!
> I will try to get the git version testing in the next few days.
> 
> I guess having a preference is a good idea, may be under Advanced|Shortcuts?
> Or is there any system (GTK) specific way to turn on/off such features?
> 
> I bet someone somewhere will find a console app that uses the same mouse
> events for something ;-)
Yeah, I'm sure about that as well :)
Comment 6 Egmont Koblinger 2016-09-22 17:48:16 CEST
(In reply to Igor from comment #4)
> I'm seeing context menu popping up on shift + right click in xfce4-terminal,
> similarly to gnome-terminal. How did you figure out that it's passed to an
> app?

By manually enabling mouse reporting:           echo -ne '\e[?1000h'
and, optional, switching to a readable format:  echo -ne '\e[?1006h'

On Shift + right click I get "6;x;yM" reported (lowercase m for release).
Comment 7 Igor editbugs 2016-09-23 12:36:35 CEST
(In reply to Egmont Koblinger from comment #6)
> (In reply to Igor from comment #4)
> > I'm seeing context menu popping up on shift + right click in xfce4-terminal,
> > similarly to gnome-terminal. How did you figure out that it's passed to an
> > app?
> 
> By manually enabling mouse reporting:           echo -ne '\e[?1000h'
> and, optional, switching to a readable format:  echo -ne '\e[?1006h'
> 
> On Shift + right click I get "6;x;yM" reported (lowercase m for release).

It seems that was done intentionally: https://git.xfce.org/apps/xfce4-terminal/tree/terminal/terminal-widget.c#n406
But, as far as I can tell based on the output, only mouse button press even gets populated; shouldn't release event also be passed to an app?
Comment 8 Igor editbugs 2016-09-23 12:50:15 CEST
I've changed the shortcut to Shift + Ctrl + wheel up/down and added a hidden setting MiscMouseWheelZoom to allow disabling the feature: https://git.xfce.org/apps/xfce4-terminal/commit/?id=760d226a9c7f1d07dfba6413984949eba512ce3c

Bug #12869

Reported by:
Kalin KOZHUHAROV
Reported on: 2016-09-22
Last modified on: 2016-09-23

People

CC List:
3 users

Version

Version:
0.6.92

Attachments

Additional information