Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pane focus changing constantly despite no input #4484

Open
VRichardJP opened this issue Oct 24, 2023 · 4 comments
Open

Pane focus changing constantly despite no input #4484

VRichardJP opened this issue Oct 24, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@VRichardJP
Copy link

VRichardJP commented Oct 24, 2023

What Operating System(s) are you seeing this problem on?

Linux X11

Which Wayland compositor or X11 Window manager(s) are you using?

X11, Mutter

WezTerm version

20230712-072601-f4abf8fd

Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?

No, and I'll explain why below

Describe the bug

In the example below, I have 2 tabs, and the 2nd tab contains 3 panes. Although I am not pressing any key or moving the mouse around, the focus keeps jumping from pane to pane. Clicking on the 1st tab has no effect (wezterm immediately goes back to the 2nd tab). Clicking on any pane, or clicking on another window does not change anything either:

wezterm_focus_jump-2023-10-24_13.02.58.webm

The problem continues even when wezterm does not have the focus, so it is not like if one of my keyboard key was stuck or something. The only way I have found to stop this behavior is to forcefully stop and close (CTRL-C, CTRL-D) each pane until it eventually stops.

To Reproduce

This bug is quite seldom: over the last week of work, it occured like 2~3 times.
I have not identified any specific pattern: I just have some tabs and panes, and at some point it starts to act crazily.

I have been using wezterm for maybe a month, but this behavior has appeared fairly recently.

Configuration

local wezterm = require 'wezterm'

local config = {}

if wezterm.config_builder then
  config = wezterm.config_builder()
end

local scheme = wezterm.color.get_builtin_schemes()['Gruvbox Dark (Gogh)']
scheme.scrollbar_thumb = "#e6d4a3"
config.color_schemes = {
        ['Gruvbox Custom'] = scheme,
}

-- config.color_scheme = 'Gruvbox Dark (Gogh)'
config.color_scheme = 'Gruvbox Custom'
config.enable_scroll_bar = true
config.hide_tab_bar_if_only_one_tab = true
config.pane_focus_follows_mouse = true
config.scrollback_lines = 100000
config.font_size = 10.0

return config

Expected Behavior

Focus should not jump around without reason.

Logs

(I will try to catch it next time)

Anything else?

No response

@VRichardJP VRichardJP added the bug Something isn't working label Oct 24, 2023
@zapman449
Copy link

I see the same thing infrequently on MacOS. I've seen this twice now?

Notably, I have pane_focus_follows_mouse = true, in my config.

The second time I saw this, moving the mouse into a pane would briefly give focus to the pane, but if I hit any key (including the ctrl key) the focus would immediately jump to a random different pane within the same window/tab.

This time I was able to recover by closing the tab-of-panes and the system recovered... I was able to gracefully close the other windows/panes etc.

FWIW, my full config can be found here: https://github.com/zapman449/dotfiles/blob/master/wezterm/.wezterm.lua

@JelteF
Copy link

JelteF commented Oct 31, 2024

I have this same issue and run into it quite frequently, i.e. multiple times a day. Until recently I was able to use ctrl+shift+z to zoom in on a pane and that would stop the constant pane switching. But now that doesn't work anymore.

Indeed I also have pane_focus_follows_mouse = true.

@pyrho
Copy link

pyrho commented Nov 7, 2024

Same issue on macOS with pane_focus_follows_mouse = true, it's seemingly random but seems to occur when I'm switching between apps using Cmd+Tab while also moving the mouse.

@ricardoseriani
Copy link

I'm having the same issue too with Ubuntu 22.04 (X11) with setting pane_focus_follows_mouse = true.
There is any way that I can help with this issue, since this feature is very useful and facilitate the use of wezterm?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants