pop-os / cosmic-comp

Compositor for the COSMIC desktop environment
GNU General Public License v3.0
466 stars 83 forks source link

Cursor: Resize & Move grab cursors get overriden by normal cursor #784

Open Koranir opened 2 weeks ago

Koranir commented 2 weeks ago

The resize & move grabs should be setting the cursor (they even call the set_shape with the right arguments), but they get set back to the default before they show (sometimes showing for one frame) by https://github.com/pop-os/cosmic-comp/blob/536484e9dae289cc5590d35e18096ba24e7d0f1f/src/shell/element/window.rs#L754-L761 This can be tested by logging the caller of set_shape, you see it gets set to the correct grab momentarily.

2024-08-28T06:07:12.044985Z  INFO backend_x11: cosmic_comp::backend::render::cursor: Set shape Default from src/shell/element/window.rs:674:46
# Drag start
2024-08-28T06:07:12.045548Z  INFO cosmic_comp::backend::render::cursor: Set shape Grab from src/shell/grabs/moving.rs:713:42
2024-08-28T06:07:12.045618Z  INFO input_seat:add_pointer:input_pointer:set_grab: cosmic_comp::backend::render::cursor: Set shape Default from src/shell/element/window.rs:757:42 name="seat-0" serial=Serial(531) focus=Clear
# Drag released
2024-08-28T06:07:12.447940Z  INFO cosmic_comp::backend::render::cursor: Set shape Default from src/shell/grabs/moving.rs:853:46
2024-08-28T06:07:12.448054Z  INFO cosmic_comp::backend::render::cursor: Set shape Default from src/shell/element/window.rs:654:46
2024-08-28T06:07:12.930338Z  INFO cosmic_comp::backend::render::cursor: Set shape Default from src/shell/element/window.rs:757:42

Some applications bypass this, showing a grab cursor shape while moving them, which I believe is because they use SSD? Resizes never show properly for me, though.