hyprwm / Hyprland

Hyprland is an independent, highly customizable, dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
https://hyprland.org
BSD 3-Clause "New" or "Revised" License
19.65k stars 830 forks source link

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

Closed TheSunCat closed 1 year ago

TheSunCat commented 1 year ago

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

vaxerski commented 1 year ago

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.

TheSunCat commented 1 year ago

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

ywxt commented 1 year ago

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.

vaxerski commented 1 year ago

can't repro any.

ywxt commented 1 year ago

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.

TheSunCat commented 1 year ago

can't repro any.

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

ywxt commented 1 year ago

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.

TheSunCat commented 1 year ago

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.

LeoGitHuber commented 1 year ago

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?

ywxt commented 1 year ago

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 commented 1 year ago

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: @.***>

LeoGitHuber commented 1 year ago

Thanks, it works.

techsavvyumer commented 1 year ago

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.