rio icon indicating copy to clipboard operation
rio copied to clipboard

Mouse pointer hidden (Ubuntu Wayland) / Cursor icon not changing

Open PitiBouchon opened this issue 2 years ago • 13 comments

Issue

After I opened the terminal, when I press the key the cursor disappear, and only re-appear when I move it outside the window. Also when I run with RIO_LOG_LEVEL=info there are a bunch of warnings: [WARN] winit::platform_impl::platform::wayland::window::state Failed to set cursor to Text when I am moving the cursor inside the terminal

Config

I using rio version 0.0.30 and also the one from the main branch. I didn't modify the font.

I am on Ubuntu 22.04 using Wayland (and zsh)

PitiBouchon avatar Dec 12 '23 23:12 PitiBouchon

Also, when moving the cursor in the window terminal (when the icon is visible), it doesn't modify its icon (like when moving to the edge to resize the window), and only when clicking will it modify the icon accordingly

PitiBouchon avatar Dec 12 '23 23:12 PitiBouchon

Do you have cursor set explicitly in the config.toml? If not try doing that and report back.

cursor = "▇"
blinking-cursor = true

RaySlash avatar Dec 14 '23 23:12 RaySlash

Do you have cursor set explicitly in the config.toml? If not try doing that and report back.

cursor = "▇"
blinking-cursor = true

I've tried to not the cursor, try the bar cursor, set the blinking-cursor to true and false, but it doesn't change anything I found not issue on winit with the filters is:issue is:open label:"DS - wayland" cursor

PitiBouchon avatar Dec 15 '23 00:12 PitiBouchon

weird. Can you post output of RIO_LOG_LEVEL=debug rio > debug_log-rio.txt here? while capturing log, replicate your scenario. Also Can you write exact steps to reproduce your bug in the main post.? Include your configuration too. Thanks

RaySlash avatar Dec 15 '23 01:12 RaySlash

rio_cursor_issue.webm

Step to reproduce : just start the rio terminal (on Ubuntu with gnome and wayland and the default config from Rio)

PitiBouchon avatar Dec 15 '23 09:12 PitiBouchon

debug_rio_log.txt Here is a log file

PitiBouchon avatar Dec 15 '23 09:12 PitiBouchon

after a few googling sessions, I was able to find this https://github.com/wez/wezterm/commit/ecc63e2e5d4938049f9bd36ba70deb379315c3ea in the Wezterm git. Major issue is that the cursor is looking for text type which has less compatibility. One way we could fix is by switching to xterm as wezterm did instead of text. Read the ISSUE on wez/wezterm maybe this is the culprit: https://github.com/raphamorim/rio/blob/b9c1732a9e26569a2beb9d63eebe9e5f1cc33e9a/frontends/cross-winit/src/router/window/mod.rs#L143

RaySlash avatar Dec 16 '23 06:12 RaySlash

Good findings @RaySlash

Wonder if we could use CursorIcon still, they have a map for alternative as well https://github.com/rust-windowing/cursor-icon/blob/main/src/lib.rs#L340

raphamorim avatar Dec 16 '23 10:12 raphamorim

That should be good. Seems like a solid plan for now. We could setup alt_names as a fallback just exactly as its described in cursor-icon. 🥳

RaySlash avatar Dec 17 '23 05:12 RaySlash

I think @PitiBouchon is talking about the mouse pointer, and not the cursor in the terminal. When they start typing in the window, the mouse pointer disappears (which is the default behaviour in the os) and does not become visible again when they move the mouse pointer outside the window.

@PitiBouchon could you check if the behaviour is same in other programs like firefox for eg.? Like, try typing inside a form in firefox (which would cause the pointer to disappear) and then move the pointer.

Cource avatar Dec 23 '23 08:12 Cource

Yup, I think I used cursor instead of mouse pointer indeed

The default behavior is what you said, when typing something the pointer disappear and then should appear when moving it. But it doesn't work for me when using rio (on ubuntu wayland)

I also have the issue with the cursor not changing icon when I move the mouse pointer near the edges or on the top bar of the window

PitiBouchon avatar Dec 23 '23 16:12 PitiBouchon

One thing to add to this: for me, the mouse pointer comes back when there is another window on the current desktop. Are you seeing the same behavior? Maybe this detail could be useful?

I am not seeing the same problem in other programs, including Firefox. I am on NixOS+Gnome+Wayland.

zh4ngx avatar Dec 25 '23 04:12 zh4ngx

Same issue here, also this is a Wayland-specific issue, not an Ubuntu-specific issue. Related #254

nyabinary avatar Dec 31 '23 16:12 nyabinary

I think this is fixed since the 0.1.X release

PitiBouchon avatar Aug 26 '24 16:08 PitiBouchon

That's great! Yea, I couldn't also reproduce anymore with 0.1.8. Closing this issue for now, thanks for the heads up @PitiBouchon

raphamorim avatar Aug 26 '24 16:08 raphamorim

That's great! Yea, I couldn't also reproduce anymore with 0.1.8. Closing this issue for now, thanks for the heads up @PitiBouchon

When typing it disappears (the mouse cursor), which is expected, but when I stop typing the cursor doesn't reappear? I assume this is another issue? :P

nyabinary avatar Sep 02 '24 13:09 nyabinary

I'm still getting this issue in 0.1.8 and 0.1.10. It happens before any other windows/apps are open.

zh4ngx avatar Sep 05 '24 06:09 zh4ngx

I'm still getting this issue in 0.1.8 and 0.1.10. It happens before any other windows/apps are open.

  1. Wayland as well?

  2. Same as the original issue or the one @nyabinary mentioned?

🙏

raphamorim avatar Sep 05 '24 06:09 raphamorim

Yup, on NixOS unstable + Wayland. You're right, I think it's more the other issue.

zh4ngx avatar Sep 05 '24 19:09 zh4ngx

Thank you for you reply, could open another issue so can keep track on it?

raphamorim avatar Sep 05 '24 19:09 raphamorim

No problem, sure

zh4ngx avatar Sep 05 '24 20:09 zh4ngx

#647

nyabinary avatar Sep 29 '24 21:09 nyabinary