sway icon indicating copy to clipboard operation
sway copied to clipboard

Mouse cursor not scaling correctly over swaybar and swaybg

Open johnae opened this issue 5 years ago • 7 comments

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).

johnae avatar May 01 '19 08:05 johnae

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.

naibaf0 avatar May 02 '19 13:05 naibaf0

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.

johnae avatar May 02 '19 18:05 johnae

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

ianyfan avatar May 02 '19 21:05 ianyfan

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.

nostdm avatar Jul 09 '19 02:07 nostdm

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?

heroin-moose avatar Apr 20 '20 10:04 heroin-moose

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

tv42 avatar Apr 14 '22 17:04 tv42

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.

Zeioth avatar Jun 30 '22 19:06 Zeioth