wezterm
wezterm copied to clipboard
Mouse pointer not shown when windows are maximized
What Operating System(s) are you seeing this problem on?
Linux Wayland
Which Wayland compositor or X11 Window manager(s) are you using?
Gnome 44
WezTerm version
20230515-073311-76406e84
Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?
Yes, and I updated the version box above to show the version of the nightly that I tried
Describe the bug
With hide_mouse_cursor_when_typing = true, the mouse ponter is not always becoming visible when it should.
When you maximize a window, and keeping it in focus, and type the mouse pointer is correctly hidden. Then when you move the mouse it will not be shown again. However, if you move focus to another window and back, then the mouse hiding/showing starts working as expected.
To Reproduce
- Open a wezterm window.
- Maximize the window (I use gnome, so I grab the windowbar and drag it to the top to maximize it). Make sure you keep the focus inside wezterm.
- Type in the window so the mouse is hidden.
- Move the mouse to make it visible. Now it should be visible but it is not.
Configuration
Relevant configuration is
hide_mouse_cursor_when_typing = true
Expected Behavior
The mouse pointer should be shown when the mouse is moved.
Logs
No response
Anything else?
This seems like a corner case, but it is highly visible if you are using maximized windows in your workflow, since you tend to maximize the window and then right away start typing.
Created a new issue as asked by @wez in #3334
I am unable to replicate this after the above mentioned issue was resolved. Could check the logs and see if it is a cursor issue
Seems to have been poor testing by me.... I have now done a proper divide an conquer of my config to find the combination that is to blame, and I can reproduce this (on nightly) using the following minimal config
local wezterm = require 'wezterm'
local act = wezterm.action
return {
hide_mouse_cursor_when_typing = true,
keys = {
{ key = 'd', mods = 'ALT|CTRL', action = act.SplitVertical { domain = 'CurrentPaneDomain' } },
{ key = 'r', mods = 'ALT|CTRL', action = act.SplitHorizontal { domain = 'CurrentPaneDomain' } },
},
-- Integrated Title Bar
window_decorations = "INTEGRATED_BUTTONS|RESIZE",
}
Note: the keys are just since I have mapped this on my keyboard to split panes.... so they are most likely not needed. It seems to be the fancy titlebar under wayland with hide mouse cursor when typing.
So, hopefully you should be albe to reproduce it using this config. Sorry, for my initial bad testing.
I'm still seeing this issue with wezterm 20240203-110809-5046fc22.
My config is minimal and does not have hide_mouse_cursor_when_typing = true in it:
local wezterm = require("wezterm")
local config = wezterm.config_builder()
config.font = wezterm.font("FiraCode Nerd Font")
config.color_scheme = "tokyonight_day"
config.hide_tab_bar_if_only_one_tab = true
return config
When the window is maximized, typing on keyboard hides the mouse cursor (though Ctrl/Shift/Alt keys by themselves do not). Cursor does not re-appear on mouse movement. It requires either switching to a different window, or a click on any of the mouse buttons.
I was facing the same issue. Setting config.enable_wayland to false fixes the issue for me.