flathub / org.geany.Geany

https://flathub.org/apps/details/org.geany.Geany
6 stars 6 forks source link

Mouse cursor is tiny, some fundamental DPI problem maybe? #37

Closed ell1e closed 10 months ago

ell1e commented 2 years ago

When I run geany from flatpak my mouse cursor is tiny and all window bars look weird (that seems to have been my own fault due to GNOME Tweaks set to the "Breeze Dark" theme), and it's kind of not very usable even due to the mouse alone:

Screenshot from 2022-10-05 00-26-56

I tested this on a Fedora Linux 36 system with GNOME 3 desktop.

TiZ-HugLife commented 2 years ago

Yeah, that doesn't look right at all. Is Fedora 36 using Wayland for GNOME? If so, Geany's decoration is provided by GTK 3.24, and whatever GTK theme that is that you're using would be responsible for drawing the window decorations. That looks like Breeze. Are you trying to use Breeze in GNOME on purpose?

The cursor sure is a mystery. This looks like a high-DPI system. I initially thought it might be trying to use the default X cursor, but if this is Wayland, I'm not sure it'd be doing that. I know very little about Wayland, because none of my systems can run a Wayland desktop system. I've got a laptop with an Nvidia card that chokes when it tries to run Plasma Wayland, and I have a Steam Deck, which still uses Xorg for desktop mode and is low-DPI.

ell1e commented 2 years ago

Yeah, apparently I had "Legacy Applications" set to Breeze Dark. Set it to Adwaita Dark now, but that doesn't fix anything. Cursor is still tiny, title bar still too small (edit: the title bar is correct, I just imagined the difference), looks really weird. And yeah this is with display scaling 125% (so a DPI factor of 1.25) and with a GNOME Wayland session. If the cursor wasn't so tiny this would be just a minor glitch, but since I basically can't see the mouse, it's really hard to use it.

TiZ-HugLife commented 2 years ago

I'm not well versed in Wayland specific issues, nor with GNOME issues. I will do my best with what I do know, though.

Are you using a non-default cursor theme? Flatpak happily grabs fonts from the host system, but it gets stubborn when it comes to elements that are more closely related to themes, and cursors definitely count, particularly since they are strangely installed in the icons directories. You usually have to poke a hole into the sandbox with a global override to get it to see non-default cursor themes. If it's installed in /usr/share/icons, you're not going to be able to get that into the sandbox. But if it's in .local/share/icons, then a global filesystem override to xdg-data/icons will make the cursors visible in the sandbox.

GTK3's default theme should know how to draw titlebars well... could you show another screenshot now that you've reconfigured the "legacy applications" theme?

ell1e commented 2 years ago

Hm, this is a very old system that went through 5 years of major Fedora versions or something. I don't think I ever changed things beyond GNOME tweaks which doesn't seem to have a cursor option and I'm pretty sure it looks like the default one, but I'm not sure how I would check that it definitely is.

But I'm wondering, is this maybe a more generic flatpak packaging issue then? Feel free to move it to a different repo or tell me where to file it, if you happen to know.

Edit: forgot the Adwaita Dark screenshot:

geany_adwaita_dark

Edit: title bar actually looks like the others now including its height, I checked by moving it next to some other thing. So I guess it's just the cursor being weird

TiZ-HugLife commented 2 years ago

Congratulations on maintaining a system through five years of major version updates. That is legitimately an achievement! But it could also be a contributor to why things are acting weird.

GNOME Tweaks should still have an option for setting the cursor, according to this article from earlier this year: https://www.linuxjournal.com/content/how-you-can-change-cursor-theme-your-ubuntu-desktop But Fedora's version of the package could be different.

However, this should still work to tell you what the cursor is: gsettings get org.gnome.desktop.interface cursor-theme After you find that out, you can do ls /usr/share/icons, ls ~/.local/share/icons, and ls ~/.icons to find out where it is. And where it is determines where we go from here.

Glad we were able to fix the title bar issue; that is indeed what the title bar should look like on GTK3's default theme.

TiZ-HugLife commented 1 year ago

@ell1e, did you discover anything in relation to this issue? What is your cursor theme and where is it installed?

ell1e commented 1 year ago

In an SDL2 app the cursor is too large if I use the Wayland backend (see here). So since neither SDL2 nor GTK+ get it right, I'm guessing something about Wayland itself is bugged regarding cursor sizes. The cursor theme set in gsettings is "Adwaita" and /usr/share/icons has a folder named like that, the other locations you listed don't.

TiZ-HugLife commented 1 year ago

Glad the SDL issue was able to be fixed; seems like it's a different kind of thing.

Can you use this command to run Geany just for giggles? flatpak run --runtime=org.gnome.Platform//43 org.geany.Geany

If this causes your cursor to render correctly, then something about how Flatpak passes cursors in to the sandbox is broken; the GNOME runtime does include the Adwaita cursor and icon themes. This isn't sufficient cause to move Geany back to the GNOME runtime; this means that it's something that needs to be fixed on Flatpak's end.

TiZ-HugLife commented 1 year ago

Since I've been doing a bunch of work on this package lately, I figured I'd check back on some of the issues filed here. @ell1e, has this problem changed for you any? I do remember seeing that Flatpak and/or the runtimes made some fixes regarding cursors relatively recently.

TiZ-HugLife commented 10 months ago

I'm gonna go ahead and close for now. Please comment here if you find this is still a problem, and I will happily re-open. Thank you very much! 🙂