Hyprland icon indicating copy to clipboard operation
Hyprland copied to clipboard

[hidpi] [XWAYLAND] XWayland mouse is tiny when on the edge of a window despite XCURSOR_SIZE env var

Open TheSunCat opened this issue 2 years ago • 7 comments

I'm using the XWayland hidpi patches, and have to export XCURSOR_SIZE=48 to get a normal-sized cursor when over an XWayland app. However, if I move the cursor to the edge of a window, it becomes tiny yet again as if the variable were not exported. This does not occur in Sway with the same patches.

https://user-images.githubusercontent.com/44881120/210223884-6a637834-41d3-408c-9d20-68a59ad89d72.mp4

TheSunCat avatar Jan 02 '23 11:01 TheSunCat

that's happening to me as well and seems to have just sprung up randomly, interestingly only on my laptop and not desktop. Can you try bisecting?

(I assume you tested sway-git)

Edit: actually just tested and it's not happening on my laptop either. odd.

vaxerski avatar Jan 02 '23 11:01 vaxerski

It's happened for as long as I remember with the hidpi patches. I don't know of any good commits.

TheSunCat avatar Jan 02 '23 11:01 TheSunCat

same issue, and some XWayland applications(Microsoft Edge, VSCode and IntelliJ IDEA) have smaller cursor size.

I installed hyprland-hidpi-xprop-git, and then set monitor scale as 2. GDK_SCALE is useless to fix it.

Maybe it's a problem with the aur package, I need to troubleshoot.

ywxt avatar Jan 06 '23 16:01 ywxt

can't repro any.

vaxerski avatar Jan 06 '23 16:01 vaxerski

I found default XCURSOR_SiZE is 32. After unset the variable, The cursor size of the Xwayland apps is back to normal.

Is there a way to automatically unset the variable after hyprland starts, I tried to execute in hyprland.conf, but it has no effect.

This is same issue on wayfire, I believe it is a bug of Xwayland.

ywxt avatar Jan 06 '23 21:01 ywxt

can't repro any.

The small cursor only happens on tiled windows. Are you testing with a similar setup as me?

TheSunCat avatar Jan 06 '23 21:01 TheSunCat

I see. I set Xft.dpi=192. After I remove it, I got a normal cursor size.

However, I need Xft.dpi, because fcitx5 depends on it in XWayland applications.

A tiny cursor on the edge of a window has always existed.

ywxt avatar Jan 07 '23 13:01 ywxt

I was able to fix it by running xsetroot -xcf /usr/share/icons/$your_cursor_theme_name/cursors/left_ptr 48! The mouse is no longer tiny when on the edge of a hidpi Xwayland app.

TheSunCat avatar Jan 15 '23 20:01 TheSunCat

I see. I set Xft.dpi=192. After I remove it, I got a normal cursor size.

However, I need Xft.dpi, because fcitx5 depends on it in XWayland applications.

A tiny cursor on the edge of a window has always existed.

Could you tell me about how to make fcitx5 display the normal size in XWayland applications? By the way, have you solved the tiny cursor problem?

LeoGitHuber avatar Mar 24 '23 09:03 LeoGitHuber

create a  .Xresource with Xft.dpi: 192 in home path, and then execute xrdb -merge ~/.Xresources.

maybe you need remove gdk_scala variable. btw qt application has a larger cursor than gtk. before launching it, reset xcursor_size variable.

---Original--- From: @.> Date: Fri, Mar 24, 2023 17:20 PM To: @.>; Cc: @.@.>; Subject: Re: [hyprwm/Hyprland] [hidpi] [XWAYLAND] XWayland mouse is tiny whenon the edge of a window despite XCURSOR_SIZE env var (Issue #1311)

I see. I set Xft.dpi=192. After I remove it, I got a normal cursor size.

However, I need Xft.dpi, because fcitx5 depends on it in XWayland applications.

A tiny cursor on the edge of a window has always existed.

Could you tell me about how to make fcitx5 display the normal size in XWayland applications? By the way, have you solved the tiny cursor problem?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

ywxt avatar Mar 24 '23 18:03 ywxt

currently, QT wayland application doesnot get wayland cursor size but reads xcursor_size variable. it needs to unset the variable. i have add it to launcher command.

Gtk application

export XCURSOR_SIZE=48 and execute gsettings set org.gnome.desktop.interface cursor-size 48

---Original--- From: @.> Date: Fri, Mar 24, 2023 17:20 PM To: @.>; Cc: @.@.>; Subject: Re: [hyprwm/Hyprland] [hidpi] [XWAYLAND] XWayland mouse is tiny whenon the edge of a window despite XCURSOR_SIZE env var (Issue #1311)

I see. I set Xft.dpi=192. After I remove it, I got a normal cursor size.

However, I need Xft.dpi, because fcitx5 depends on it in XWayland applications.

A tiny cursor on the edge of a window has always existed.

Could you tell me about how to make fcitx5 display the normal size in XWayland applications? By the way, have you solved the tiny cursor problem?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

ywxt avatar Mar 24 '23 18:03 ywxt

Thanks, it works.

LeoGitHuber avatar Mar 25 '23 08:03 LeoGitHuber

I had the same issue, cursor got small i.e 24px when using QT applications or on desktop. I wanted it to be 32px as in GTK applications I set it to 32px. In my hyprland config file, I set the "env = XCURSOR_SIZE = 32". I don't know what's wrong with "env = XCURSOR_SIZE = 32" it didn't work. Then I wrote it as "env = XCURSOR_SIZE,32" and it worked fine.

techsavvyumer avatar Mar 28 '23 11:03 techsavvyumer