Guake / guake

Drop-down terminal for GNOME
https://guake.github.io
GNU General Public License v2.0
4.42k stars 574 forks source link

Mouse scroll in terminal started to switch tabs: How to switch this off? #2142

Open dreirund opened 1 year ago

dreirund commented 1 year ago

With a recent update (I am at guake version 3.9.1.dev0 (according to guake --version) from Arch Linux) when I use mouse wheel on a guake terminal window, guake changes tabs (as well as forwarding the scroll to the currently opened terminal, which changes quickly while scrolling).

In the settings of guake (Right click -> "Preferences"), I don't see that I have mouse scroll assigned to any action, and especially under "Keyboard shortcuts", "Go to previos tab" and "Go to next tab" are assigned to <Alt>+<Left> and <Alt>+<Right>, respectively.

How can I switch off that mouse scroll switches tabs, so that I can use it to scroll within the terminal window without any interference?

I also don't know where guake stores it's settings; a find .[a-zA-Z]* | grep guake in my home directory did only reveal the session storage .config/guake/session.json. Otherwise I would have posted my quake configuration file.

Regards!

hackedd commented 1 year ago

I can not reproduce this, scrolling while the mouse is over the tab list switches between tabs (which is consistent with many other applications presenting a tabbed interface) while scrolling over the terminal scrolls that terminal only.

Which desktop environment and window manager are you using? Can you also include the output of guake --support?

dreirund commented 1 year ago

Which desktop environment

None,

and window manager

xfwm4

At system startup, a lightdm session manager starts, and from this, the ~/.xinitrc is used to start things up.

Here is my ~/.xinitrc (removed all lines which are just comments; guake was started at the point where now xfce4-terminal and sxhkd are started):

_wait_for_window() {
  if [ $# -lt 1 ]; then
    printf '%s\n' "Error in '${FUNCNAME[0]}()': No argument specified. Need a window name as argument." > /dev/stderr
    return 1
  fi
  while ! $(wmctrl -l | sed -E 's|^[^ ]+ +[^ ]+ +[^ ]+ +||' | grep -qFx "$1"); do
    sleep 1
  done
}

_move_window_to_workspace() {
  if [ $# -lt 2 ]; then
    printf '%s\n' "Error in '${FUNCNAME[0]}()': Too few arguments specified. Need a window name and a workspace number as arguments." > /dev/stderr
    return 1
  fi
  _wait_for_window "$1"
  wmctrl -F -r "${_window}" -t "$2"
}

/usr/local/bin/xrandr-all-1280x720.sh

xhost +
xset s off
xset -dpms
xkbset bo 50 # Set key debouncing (50 ms).
if [ -r ~/.Xresources ]; then
  xrdb ~/.Xresources
fi
xterm &
touchegg --client --quiet &

if [ "${DISPLAY%%.*}" == ":0" ]; then
  xfwm4 &
  xfce4-panel &
  pasystray &
  arandr-indicator &
  xfce4-terminal --drop-down --maximize --default-working-directory="${HOME}/tmp" --tab --tab --tab --tab --tab --tab --tab --tab --tab --tab --working-directory="/" -e /usr/local/bin/get_root.sh --tab --working-directory="/" -e /usr/local/bin/get_root.sh &
  { 
     sleep 5;
     xfce4-terminal --drop-down # Hide terminal after initial startup
  } &
  sxhkdrc -c ~/.sxhkd/sxhkdrc &
  clipit &
  blueman-applet &
  redshift-gtk -c ~/.config/redshift.conf -r &
  pulseaudio-dlna --port 10291 --debug --auto-reconnect &
  xsetroot -solid grey

  uxterm -geometry 64x12+0+0     -sl 0     -bg white -fg black -xrm "xterm*allowTitleOps: false" -title 'nload'      -e nload.my &
  uxterm -geometry 65x12+396+0   -sl 0     -bg white -fg black -xrm "xterm*allowTitleOps: false" -title 'pingtest'   -e sh -c 'while true; do ping -n -i5 gmx.de; sleep 1; done' &
  uxterm -geometry 79x26+798+359 -sl 10240 -bg white -fg black -xrm "xterm*allowTitleOps: false" -title 'user shell' &
  uxterm -geometry 79x26+798+0   -sl 10240 -bg black -fg white -xrm "xterm*allowTitleOps: false" -title 'root shell' -e get_root.sh &
  uxterm -geometry 131x21+0+179  -sl 0     -fg black -bg white -xrm "xterm*allowTitleOps: false" -title 'top'        -e top.my &
  uxterm -geometry 131x17+0+475  -sl 0     -fg black -bg white -xrm "xterm*allowTitleOps: false" -title 'iotop'      -e sudo /usr/local/bin/iotop.my &

  for _window in 'nload' 'pingtest' 'user shell' 'root shell' 'top' 'iotop'; do
    _move_window_to_workspace "${_window}" 1 &
  done

  unset _window

  unset -f _wait_for_window
  unset -f _move_window_to_workspace
else
  icewm &
fi

sleepforever

And here my environment (some personal data replaced with <censored>):

PRI_Y=
OPUSHOME=/opt/spiceopus
PRI_X=
SHELL=/bin/bash
PRI_Z=
WINDOWID=35651596
PRI_Q=
PRI_P=
PRI_S=
PRI_R=
PRI_U=
PRI_T=
PRI_W=
PRI_V=
PRI_I=
PRI_H=
PRI_K=
PRI_J=
PRI_M=
COLORTERM=truecolor
PRI_L=
PRI_O=
PRI_N=
PRI_A=
PRI_C=
PRI_B=
CSF_MDTVTexturesDirectory=/usr/share/opencascade/resources/Textures
PRI_E=
PRI_D=
PRI_G=
PRI_F=
XDG_CONFIG_DIRS=/etc/xdg
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
HISTCONTROL=ignoredups
GTK_IM_MODULE=xim
CSF_DrawPluginDefaults=/usr/share/opencascade/resources/DrawResources
DONE_FILE=/home/<censored>/.todo/todo-files/done.txt
HISTSIZE=1000
COLOR_NUMBER=
COLOR_PROJECT=
COLOR_META=
REPORT_FILE=/home/<censored>/.todo/todo-files/report.txt
LC_ADDRESS=de_DE.utf-8
CSF_LANGUAGE=us
LC_NAME=de_DE.utf-8
CSF_MIGRATION_TYPES=/usr/share/opencascade/resources/StdResource/MigrationSheet.txt
XDG_DATA_HOME=/home/<censored>/.local/share
GRADLE_HOME=/usr/share/java/gradle
HISTTIMEFORMAT=%F %T 
XDG_CONFIG_HOME=/home/<censored>/.config
DESKTOP_SESSION=xinitrc
LC_MONETARY=de_DE.utf-8
TODOTXT_SORT_COMMAND=env LC_COLLATE=C sort -f -d -k2
COLOR_CONTEXT=
CSF_OCCTResourcePath=/usr/share/opencascade/resources
SPICE_LIB_DIR=/opt/spiceopus/lib/spiceopus
CSF_STEPDefaults=/usr/share/opencascade/resources/XSTEPResource
EDITOR=mcedit
GTK_MODULES=canberra-gtk-module:appmenu-gtk-module
XDG_SEAT=seat0
PWD=/home/<censored>
XDG_SESSION_DESKTOP=xinitrc
LOGNAME=<censored>
QT_QPA_PLATFORMTHEME=qt5ct
XDG_SESSION_TYPE=x11
DSSI_PATH=/home/<censored>/.dssi:/usr/lib/dssi:/usr/local/lib/dssi
DRAWHOME=/usr/share/opencascade/resources/DrawResources
XAUTHORITY=/home/<censored>/.Xauthority
CSF_StandardLiteDefaults=/usr/share/opencascade/resources/StdResource
XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/<censored>
MOTD_SHOWN=pam
LD_PRELOAD=/usr/${LIB}/libgtk3-nocsd.so.0
TODO_NOTE_TAG=note
HOME=/home/<censored>
LC_PAPER=de_DE.utf-8
LANG=en_DE.utf-8
VST_PATH=/home/<censored>/.vst:/usr/lib/vst:/usr/local/lib/vst
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=00:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.avif=01;35:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:*~=00;90:*#=00;90:*.bak=00;90:*.old=00;90:*.orig=00;90:*.part=00;90:*.rej=00;90:*.swp=00;90:*.tmp=00;90:*.dpkg-dist=00;90:*.dpkg-old=00;90:*.ucf-dist=00;90:*.ucf-new=00;90:*.ucf-old=00;90:*.rpmnew=00;90:*.rpmorig=00;90:*.rpmsave=00;90:
_PROFILE_D_SOURCED=yes
VTE_VERSION=7001
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
TODO_FILE=/home/<censored>/.todo/todo-files/todo.txt
GTK_CSD=0
CSF_ShadersDirectory=/usr/share/opencascade/resources/Shaders
CSF_EXCEPTION_PROMPT=1
CSF_XmlOcafResource=/usr/share/opencascade/resources/XmlOcafResource
TODO_CONF_DIR=/home/<censored>/.todo
XDG_CACHE_HOME=/home/<censored>/.cache
TODO_NOTE_EXT=.txt
CSF_SHMessage=/usr/share/opencascade/resources/SHMessage
TODOTXT_FINAL_FILTER=swallow
XDG_SESSION_CLASS=user
ANDROID_HOME=/opt/android-sdk
TERM=xterm-256color
LC_IDENTIFICATION=en_DE.utf-8
GTK_OVERLAY_SCROLLING=0
LESSOPEN=|/usr/bin/lesspipe.sh %s
SPICE_EXEC_DIR=/opt/spiceopus/bin
USER=<censored>
SDL_AUDIODRIVER=alsa
TODO_ACTIONS_DIR=/home/<censored>/.todo/todo-actions.d
TODO_NOTES_DIR=/home/<censored>/.todo/todo-files/notes
CSF_StandardDefaults=/usr/share/opencascade/resources/StdResource
CSF_IGESDefaults=/usr/share/opencascade/resources/XSTEPResource
DISPLAY=:0
CSF_XCAFDefaults=/usr/share/opencascade/resources/StdResource
SHLVL=1
COLOR_DATE=
COLOR_DONE=
PAGER=less
LC_TELEPHONE=de_DE.utf-8
LC_MESSAGES=C
LC_MEASUREMENT=de_DE.utf-8
XDG_VTNR=12
CSF_PluginDefaults=/usr/share/opencascade/resources/StdResource
UBUNTU_MENUPROXY=1
CSF_TObjMessage=/usr/share/opencascade/resources/TObj
XDG_SESSION_ID=2
CASROOT=/usr
LC_CTYPE=de_DE.utf-8
XDG_RUNTIME_DIR=/tmp/XDG-<censored>
DEBUGINFOD_URLS=https://debuginfod.artixlinux.org 
LC_TIME=de_DE.utf-8
QT_AUTO_SCREEN_SCALE_FACTOR=1
CSF_XSMessage=/usr/share/opencascade/resources/XSMessage
LC_COLLATE=de_DE.utf-8
GTK3_MODULES=xapp-gtk3-module
MMGT_CLEAR=1
XDG_DATA_DIRS=/usr/local/share:/usr/share
BROWSER=/usr/bin/firefox
PATH=/home/<censored>/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/opt/android-sdk/emulator:/opt/android-sdk/platform-tools:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
CSF_TObjDefaults=/usr/share/opencascade/resources/StdResource
GDK_SCALE=1
GDMSESSION=xinitrc
HISTFILESIZE=
TODO_DIR=/home/<censored>/.todo/todo-files
ELM_SCALE=1
SAL_USE_VCLPLUGIN=kde4
DBUS_SESSION_BUS_ADDRESS=unix:path=/tmp/dbus-zSDFlTY2GS,guid=<censored>
LV2_PATH=/home/<censored>/.lv2:/usr/lib/lv2:/usr/local/lib/lv2
MAIL=/var/spool/mail/<censored>
QT_PLUGIN_PATH=/home/<censored>/.kde4/lib/kde4/plugins/:/usr/lib/kde4/plugins/
DRAWDEFAULT=/usr/share/opencascade/resources/DrawResources/DrawDefault
LC_NUMERIC=en_US.utf-8
OLDPWD=/home/<censored>/tmp
LADSPA_PATH=/home/<censored>/.ladspa:/usr/lib/ladspa:/usr/local/lib/ladspa
CADENCE_AUTO_STARTED=true
_=/usr/bin/env

Can you also include the output of guake --support?

Here:

(guake:9994): Gtk-WARNING **: 13:31:47.856: Theme parsing error: gtk.css:2440:18: '-gtk-icon-filter' is not a valid property name

(guake:9994): Gtk-WARNING **: 13:31:47.864: Theme parsing error: gtk.css:6258:18: '-gtk-icon-filter' is not a valid property name
<details><summary>$ guake --support</summary>

Guake Version:      3.9.1.dev0

Vte Version:        0.70.1

Vte Runtime Version:    0.70.1

--------------------------------------------------
GTK+ Version:       3.24.34

GDK Backend:        <GdkX11.X11Display

--------------------------------------------------
Desktop Session: xinitrc

--------------------------------------------------
Display: :0

RGBA visual: True

Composited: False

* Monitor: 0 - DSI1
    * Geometry:     1280 x 720 at 0, 304
    * Size:     339 x 190 mm²
    * Primary:      True
    * Refresh rate: 60.082 Hz
    * Subpixel layout:  horizontal-rgb
* Monitor: 1 - HIQ HDMI1
    * Geometry:     1280 x 1024 at 0, 0
    * Size:     380 x 300 mm²
    * Primary:      False
    * Refresh rate: 75.024 Hz
    * Subpixel layout:  unknown

Does that help?

I am not sure if this in the end is some "magic" from GTK3 itself that was imposed upon me at some upgrade. Any hint on how I can track this down is helpful as well.

I have for now resorted to use xfce4-terminal --drop-down, but I would like guake more because of the built-in session save feature.

Regards!

danielrozenberg commented 1 year ago

I'm experiencing the same issue, and downgrading to a previously-known working version of Guake didn't resolve this issue, so I suspect it's caused by an update to something else in the system. I'm using Gnome 42.4, the output of guake --support is:

<details><summary>$ guake --support</summary>

Guake Version:      3.9.0

Vte Version:        0.70.0

Vte Runtime Version:    0.70.0

--------------------------------------------------
GTK+ Version:       3.24.34

GDK Backend:        <GdkX11.X11Display

--------------------------------------------------
Desktop Session: gnome

--------------------------------------------------
Display: :1

RGBA visual: True

Composited: True

* Monitor: 0 - HWP DP-6
    * Geometry:     2560 x 1440 at 0, 0
    * Size:     597 x 336 mm²
    * Primary:      True
    * Refresh rate: 59.95 Hz
    * Subpixel layout:  unknown
* Monitor: 1 - HWP DP-7
    * Geometry:     2560 x 1440 at 2560, 0
    * Size:     597 x 336 mm²
    * Primary:      False
    * Refresh rate: 59.95 Hz
    * Subpixel layout:  unknown

I also tried running guake --verbose and seeing if anything interesting happens in the logs - steps I took were:

  1. guake --verbose
  2. Open a second tab with +T
  3. Scroll up and down on top of the terminals (not the tab row)

The tabs switched, but nothing showed up on the log after mom, I've been called: add_tab

Let me know what else I can do to help debug this!

4ext commented 1 year ago

I had the same problem. It was strange that only guake was affected, but there were almost no reports about this.

GTK_IM_MODULE=xim was the culprit, in my case at least. Unsetting or changing to ibus solved it for me. Looking at @dreirund 's posted environment where it's set to xim as well, I hope this information can be useful.

danielrozenberg commented 1 year ago

@4ext's solution works for me. I ran im-config -n ibus and restarted my computer - scrolling on Guake no longer switches tabs!

dreirund commented 1 year ago

GTK_IM_MODULE=xim was the culprit, in my case at least. Unsetting or changing to ibus solved it for me.

I can confirm that this was also the culprit for me.

Is this a bug in xim, a bug in guake, a bug in GTK3, or in some intermediate library or (default) configuration, or where?

coozoo commented 1 year ago

Hm, after upgrading from fedora 36 to 38 I got something similar just only attempts to scroll up switching tabs from left to right, but in case of scrolling down everything works as expected... I'm on Mate DE and doesn't matter with compiz or marco it works in the same way....

dreirund commented 1 year ago

I have left guake in favour of xfce4-terminal --drop-down together with a hotkey daemon. I unsubscribe from this issue.

seyfer commented 1 year ago

I have the same issue on ubuntu 23.10 where do I change GTK_IM_MODULE=ibus to ibus and make it persistent?

Davidy22 commented 1 year ago

Additions to /etc/profile.d/ should let you set thing persistently like that.

seyfer commented 1 year ago

@Davidy22 seems like just running this command im-config -n ibus made it persistent. And it solved the Guake tabs scrolling problem.

m0rjjj commented 1 week ago

It happened to me too. I am using Ubuntu 24.04.1

guake --support
<details><summary>$ guake --support</summary>

Guake Version:      3.10

Vte Version:        0.76.0

Vte Runtime Version:    0.76.0

--------------------------------------------------
GTK+ Version:       3.24.41

GDK Backend:        <GdkX11.X11Display

--------------------------------------------------
Desktop Session: ubuntu

--------------------------------------------------
Display: :1

RGBA visual: True

Composited: True

* Monitor: 0 - MSI DP-2
    * Geometry:     3440 x 1440 at 0, 0
    * Size:     797 x 333 mm²
    * Primary:      True
    * Refresh rate: 99.998 Hz
    * Subpixel layout:  unknown

im-config -n ibus saved the day