swaywm / sway

i3-compatible Wayland compositor
https://swaywm.org
MIT License
14.44k stars 1.1k forks source link

Mouse cursor not scaling correctly over swaybar and swaybg #4112

Open johnae opened 5 years ago

johnae commented 5 years ago

sway version c1186182785d15eb205bac4b49d0888e1a6601ee wlroots version cf3b083c329b4e3ce89d16d77253e30137e86da2

swaymsg -t get_outputs
Output eDP-1 'Sharp Corporation 0x148B 0x00000000' (focused)
  Current mode: 3840x2160 @ 59.997002 Hz
  Position: 0,0
  Scale factor: 2.000000
  Subpixel hinting: unknown
  Transform: normal
  Workspace: 3: term
  Available modes:
    3840x2160 @ 47.997002 Hz
    3840x2160 @ 59.997002 Hz

Basically the cursor looks good over applications, but when over just swaybg or swaybar it is very small (as if it wasn't scaled I suppose).

naibaf0 commented 5 years ago

This has been a work in progress for a while, see here: https://github.com/swaywm/wlroots/pull/1324

Also see #3014 and a few more.

johnae commented 5 years ago

Ok. Odd, I just seem to remember it not doing this when over swaybg / swaybar just a month ago or something. Perhaps it's always been a thing as you say though.

ianyfan commented 5 years ago

Ref https://github.com/swaywm/sway/issues/1750

nostdm commented 5 years ago

Same issue here, it used to scale fine a few updates back, I just updated sway and now it's small when hovering over tabs, background and swaybar.

Update: I managed to fix the issue by installing a DMZ (black) cursor theme under ~/.icons/default/. I think the issue was that I didn't have any cursor themes installed at all.

heroin-moose commented 4 years ago

I have the following debug message when I move cursor over swaybg or sway titlebars:

00:04:09.454 [sway/input/cursor.c:773] denying request to set cursor from unfocused client

If I remove the relevant check cursor gets consistent with xcursor theme and size but it glitches like crazy on every move. I don't know if this code path is relevant, just an observation.

@emersion, could you please clarify on this, is this debug message expected when pointer is moving over swaybg or sway UI elements?

tv42 commented 2 years ago

For me, this got fixed by applying the config from https://github.com/swaywm/sway/issues/6931 and explicitly setting the cursor theme:

seat seat0 xcursor_theme Adwaita
Zeioth commented 2 years ago

I can confirm the xcursor theme matters. On my end the cursor theme Breeze only scales correctly on X apps, while Adwaita seems to scale correctly on all applications.