rust-windowing / winit

Window handling library in pure Rust

Home Page:https://docs.rs/winit/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cursor icons other than standard pointer stopped showing up on wayland

jleibs opened this issue · comments

Description

When the application attempts to change the cursor from pointer to one of the other icons such as the resize or drag arrows, the cursor instead simply disappears.

The issue only manifests when running through Wayland. Forcing through xwayland works fine.

This is part of an egui application (rerun) running on Arch / Hyprland / Nvidia. WLR_NO_HARDWARE_CURSORS=1 is set.

I believe this used to work for the same application instance, so it's very likely something changed on the wlroots/wayland/hyprland side of things and isn't strictly a winit issue, but unsure of where else to look for next steps when debugging.

Debugging output

Some relevant sections from log:

[2484263.932] wl_callback@20.done(3514)
[2484263.947]  -> wl_seat@10.get_keyboard(new id wl_keyboard@20)
[2484265.297]  -> zwp_text_input_manager_v3@17.get_text_input(new id zwp_text_input_v3@21, wl_seat@10)
[2484265.305]  -> wl_compositor@3.create_surface(new id wl_surface@22)
[2484265.311]  -> wl_seat@10.get_pointer(new id wl_pointer@23)
[2484265.315]  -> wl_registry@2.bind(4, "wp_cursor_shape_manager_v1", 1, new id [unknown]@24)
[2484265.321]  -> wp_cursor_shape_manager_v1@24.get_pointer(new id wp_cursor_shape_device_v1@25, wl_pointer@23)
[2484265.327]  -> zwp_relative_pointer_manager_v1@18.get_relative_pointer(new id zwp_relative_pointer_v1@26, wl_pointer@23)
[2484271.368]  -> wl_compositor@3.create_surface(new id wl_surface@27)
[2484271.378]  -> xdg_wm_base@14.get_xdg_surface(new id xdg_surface@28, wl_surface@27)
[2484271.383]  -> xdg_surface@28.get_toplevel(new id xdg_toplevel@29)
[2484271.387]  -> zxdg_decoration_manager_v1@15.get_toplevel_decoration(new id zxdg_toplevel_decoration_v1@30, xdg_toplevel@29)
[2484271.399]  -> zxdg_toplevel_decoration_v1@30.set_mode(2)
[2484271.403]  -> wp_viewporter@12.get_viewport(new id wp_viewport@31, wl_surface@27)
[2484271.408]  -> wp_fractional_scale_manager_v1@11.get_fractional_scale(new id wp_fractional_scale_v1@32, wl_surface@27)
[2484271.413]  -> wl_compositor@3.create_region(new id wl_region@33)
[2484271.418]  -> wl_region@33.add(0, 0, 2147483647, 2147483647)
[2484271.423]  -> wl_surface@27.set_opaque_region(wl_region@33)
[2484271.427]  -> wl_region@33.destroy()
[2484271.432]  -> xdg_toplevel@29.set_app_id("rerun")
[2484271.436]  -> xdg_toplevel@29.set_title("Rerun Viewer")
[2484271.440]  -> xdg_toplevel@29.set_min_size(320, 450)
[2484271.444]  -> xdg_toplevel@29.set_max_size(0, 0)
[2484271.448]  -> wl_surface@27.commit()
[2484271.453]  -> wl_display@1.sync(new id wl_callback@34)
...
[2484332.962] zwp_primary_selection_offer_v1@4278190081.offer("STRING")
[2484332.998] zwp_primary_selection_device_v1@47.selection(zwp_primary_selection_offer_v1@4278190081)
[2484333.002] zwp_primary_selection_device_v1@47.data_offer(new id zwp_primary_selection_offer_v1@4278190082)
[2484333.004]  -> wp_cursor_shape_device_v1@25.set_shape(3523, 1)
[2484333.013] zwp_primary_selection_offer_v1@4278190082.offer("text/plain;charset=utf-8")
[2484333.014]  -> xdg_surface@28.ack_configure(3517)
...
[2484334.030] wl_display@1.delete_id(55)
[2484334.127]  -> wp_cursor_shape_device_v1@25.set_shape(3523, 1)
[2484334.137]  -> wp_cursor_shape_device_v1@25.set_shape(3523, 1)
[2484334.547]  -> wl_surface@27.frame(new id wl_callback@55)
[2484334.705]  -> wl_surface@27.attach(wl_buffer@49, 0, 0)
[2484334.717]  -> wl_surface@27.damage(0, 0, 2147483647, 2147483647)
[2484334.723]  -> wl_surface@27.commit()
...
[2485751.702] xdg_surface@28.configure(3535)
[2485751.738]  -> wl_data_offer@4278190080.destroy()
[2485751.746]  -> wp_cursor_shape_device_v1@25.set_shape(3537, 1)
[2485751.757]  -> zwp_primary_selection_offer_v1@4278190082.destroy()
[2485751.768]  -> zwp_primary_selection_offer_v1@4278190083.destroy()
[2485751.777]  -> xdg_surface@28.ack_configure(3535)
[2485753.047] wl_pointer@48.motion(5068713, 1699.38671875, 804.32812500)
...
[2488141.003] wl_pointer@48.frame()
[2488141.830]  -> wp_cursor_shape_device_v1@25.set_shape(3537, 1)
[2488141.841]  -> wp_cursor_shape_device_v1@25.set_shape(3537, 27)
[2488142.386] wl_buffer@49.release()
...
[2488160.997] wl_pointer@48.motion(5071121, 431.72656250, 898.85546875)
[2488161.001] wl_pointer@48.frame()
[2488162.564]  -> wp_cursor_shape_device_v1@25.set_shape(3537, 27)
[2488162.575]  -> wp_cursor_shape_device_v1@25.set_shape(3537, 1)
[2488163.009] wl_pointer@48.motion(5071123, 430.10156250, 900.48437500)
[2488163.027] wl_pointer@48.frame()
[2488163.085] wl_buffer@41.release()

Window isn't shown unless you draw

  • I understand that windows aren't shown on Wayland unless I draw and present to them.

Winit version

0.29.9

Full log:
log.txt

Updating wlroot / hyprland seems to have resolved the issue.