winit icon indicating copy to clipboard operation
winit copied to clipboard

Failed to set cursor to Default

Open Tungsten842 opened this issue 3 years ago • 6 comments

I am using pw-viz on wayland with sway. Each time I move the mouse I get this, hundred of times:

[winit::platform_impl::platform::wayland::seat::pointer] Failed to set cursor to Default
[winit::platform_impl::platform::wayland::seat::pointer] Failed to set cursor to Default
[winit::platform_impl::platform::wayland::seat::pointer] Failed to set cursor to Default

Seems related to this: https://github.com/rust-windowing/winit/pull/1991

Tungsten842 avatar Jan 08 '23 17:01 Tungsten842

Do you set it on each frame or something like that? I'm not sure what you want here, since it's not our issue?

You likely just don't have the cursor theme setup.

kchibisov avatar Jan 08 '23 21:01 kchibisov

Be aware that winit won't retry to do anything without user, only if you ask it to do so.

kchibisov avatar Jan 08 '23 21:01 kchibisov

I'm seeing this warning when running uad:

2024-05-18 09:04:41 WARN  [/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.15/src/platform_impl/linux/wayland/window/state.rs:708] Failed to set cursor to Pointer
2024-05-18 09:04:41 WARN  [/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.15/src/platform_impl/linux/wayland/window/state.rs:708] Failed to set cursor to Text
2024-05-18 09:04:41 WARN  [/home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.15/src/platform_impl/linux/wayland/window/state.rs:708] Failed to set cursor to Pointer

The cursor on window goes wonky.


                                     ......             dan@kyoto
     .,cdxxxoc,.               .:kKMMMNWMMMNk:.         -------------------
    cKMMN0OOOKWMMXo. A        ;0MWk:'      ':OMMk.      OS: openSUSE Tumbleweed 20240510 x86_64
  ;WMK;'       'lKMMNM,     :NMK'             'OMW;     Host: Unavailable
 cMW;             WMMMN   ,XMK'                 oMM.    Kernel: 6.8.8-1-default
.MMc             ''^*~l. xMN:                    KM0    Uptime: 11 mins
'MM.                   .NMO                      oMM    Packages: 38 (flatpak-user)
.MM,                 .kMMl                       xMN    Shell: bash 5.2.26
 KM0               .kMM0' .dl>~,.               .WMd    Display (NCP002B): 1920x1080 @ 60Hz [Built-in]
 'XM0.           ,OMMK'    OMMM7'              .XMK     DE: Gnome 46.1
   *WMO:.    .;xNMMk'       NNNMKl.          .xWMx      WM: Mutter (Wayland)
     ^ONMMNXMMMKx;          V  'xNMWKkxllox0NMWk'       WM Theme: Adwaita-dark
         '''''                    ':dOOXXKOxl'          Theme: Adwaita-dark [GTK2/3/4]
                                                        Icons: Adwaita [GTK2/3/4]
                                                        Font: Inter Regular (11pt) [GTK2/3/4]
                                                        Cursor: Adwaita (24px)
                                                        Terminal: GNOME Terminal 3.52.1
                                                        Terminal Font: Fira Code Regular (10pt)
                                                        CPU: 11th Gen Intel(R) Core(TM) i5-1135G7 (8) @ 4.20 GHz
                                                        GPU: Intel Iris Xe Graphics @ 1.30 GHz [Integrated]
                                                        Memory: 3.70 GiB / 7.49 GiB (49%)
                                                        Swap: 0 B / 7.49 GiB (0%)
                                                        Disk (/): 5.72 GiB / 146.24 GiB (4%) - ext4
                                                        Disk (/home): 67.19 GiB / 313.22 GiB (21%) - ext4
                                                        Battery: 100% [AC Connected]

nandgator avatar May 18 '24 03:05 nandgator

You should install cursor theme and properly set it via env variable.

kchibisov avatar May 18 '24 07:05 kchibisov

I had to set XCURSOR_THEME=THEME_NAME in ~/.bashrc. Thanks!

nandgator avatar May 18 '24 12:05 nandgator

I had this issue on OpenSuse tumbleweed with gnome, I fixed making the /usr/share/icons/default dir and writing the index.theme file which has to contain this text:

[Icon Theme]
Inherits=Adwaita

This dir was missing on my system, anyway I was getting this issue also on wezterm, and veloren, now it is gone.

I found the fix at this link: https://gitlab.alpinelinux.org/alpine/aports/-/issues/13901

AliothCancer avatar Oct 23 '24 08:10 AliothCancer