3 ms·
What’s so complicated about just copying Windows, Android or Qt 1:1? I’ve got all my time already full with jobs, projects, and other stuff I’m working on, if
by kuschku 5y ago
What’s so complicated about just copying Windows, Android or Qt 1:1?
I’ve got all my time already full with jobs, projects, and other stuff I’m working on, if I’d find time, I’d love to help extending wayland, deprecating GTK3 and GTK4, and modifying the software accordingly.
I’ve made custom patches for the same purpose in the past already, but I just don’t have the time.
Especially since with X11 it was at least somewhat possible to do it, but now with wayland it’s sadly enforced in the protocol to only use 8-bit sRGB and integer scale factors.
If I ever find the person responsible for that decision...
- vetinari 5y agoAndroid started with it from the start and developers were aware of it. Windows and Qt were retrofitted and it shows. Both are buggy and unreliable.
- md8z 5y agoIt's not hard to copy an API specification, but actually implementing the API and changing drawing in every app, toolkit and compositor to support floating point is what is going to be complicated and will take time. Edit: The decision to use integer coordinates I believe was made long ago in GTK1 because that's what X11 used, and it just hasn't been changed since. "Especially since with X11 it was at least somewhat possible to do it" X11 never actually supported this and also only uses integers for screen and input coordinates so I'm not sure what you're referring to. I think you are thinking of the app itself doing its own DPI scaling which will also work in wayland, but it will have the same problems where the DPI could mismatch with other apps and with the rest of the desktop. "I’d love to help extending wayland, deprecating GTK3 and GTK4" Well GTK3 is already in maintenance mode, and apps are currently in the process of being ported to GTK4, so first they'll probably want to finish that and get some feedback before starting on GTK5... it will probably be at least a few years before anything related to this could ship.
- kuschku 5y agoGTK2 had an integer DPI variable. GTK3 now just has an integer scale variable. GTK2 could actually render at 144dpi, or 108dpi, just fine. Everything was slightly misaligned, not everything scaled perfectly, but it worked. X11 had an integer Xft.dpi variable. Wayland now just has an integer scale variable. WHY was this downgrade made? If a protocol break could be made to remove this functionality, a protocol break to add it back should be just as justified. Break everything, apparently removing functionality was a good enough reason to do it, re-adding it should be just as well. Yes, I am extremely angry after having spent years yelling at the wayland-wg and gnome devs not to make these decisions, not to put these things into the protocol, and complaining that if an API break is necessary, it should be extensible for these use cases. I’ve been complaining for a decade now and all of the complaints got ignored and instead the mistakes I warned about were made.
- vetinari 5y ago> GTK2 could actually render at 144dpi, or 108dpi, just fine. Your definition for just fine must differ from everyone's else. Most GTK2 shipped assets for 96 dpi and that's it. Just try running GIMP on 192 dpi display, with "properly set dpi", for example. You will see yourself that is was not just fine. > WHY was this downgrade made? Because it didn't work. That's why. > If a protocol break could be made to remove this functionality It wasn't protocol break. It was apps either ignoring the facilities (in better case) or being outright broken -> desktop locking on constant values, where everyone was able to test their wares. > protocol break to add it back should be just as justified. Not going to happen. > Break everything, apparently removing functionality was a good enough reason to do it, re-adding it should be just as well. You can start. Show 'em.
- kuschku 5y ago> You can start. Show 'em. I have. I’ve made a custom build from source of my entire desktop environment, changing the scale factor back to a dpi value, and modifying Qt and Gtk2 apps to use that. And it works. You just need to break the wayland protocol and rebuild everything from source, but for over 2 years, I ran that as daily driver setup because I was so pissed off by this decision.
- vetinari 5y ago> and changing drawing in every app Exactly. Nobody is going to update everything what's already out there. For many things, there's not even the source, even if there was a will. There's unbelievable dragging of the feet in the Linux community, so even that will is a big question. These compositors have to play with cards they were dealt, not with cards they wish they had.
- md8z 5y agoSadly I think you will have to accept some of those apps will just never have Windows-style DPI scaling, sorry. It's the same thing with various older apps on Windows that will just not get updated because they use Win32 API functions that are hardcoded to use integers. Maybe you could come up with some clever solution that tricks them into rendering at a different size? I'm really not sure, if you are an expert in this then please help.
- kuschku 5y agoWindows actually modified the old-school Win32 APIs to support DPI scaling recently, so even most WinForms apps get proper DPI scaling. It’s absolutely possible. And as mentioned, switching from dpi as int to scale-factor as int was reason enough to break all software, going back should be just as justified.
- md8z 5y agoIf you know the technical details of how that was done in Windows then please help get that implemented. AFAIK those win32 APIs were not changed to take floating point, so there is some other kind of heuristic or something going on there, and I expect it won't work in all cases e.g. if the application itself renders its own backing surfaces and never takes scale into account.
- kuschku 5y agoAFAIK it’s not much different from e.g. Qt. As the protocol between compositor and app includes a full dpi value the toolkit can just render everything at a larger scale, with the same rounding pattern used to ensure everything still fits. Sure, some parts will be slightly offset, and any widget that first renders, requests the rendered data, and post-processes that will be slightly blurry, but it works fine. The same can be done in any environment where the protocol between toolkit and compositor contains enough metadata and applications can tell the compositor that they’re rendering at native scale. So, X11 works, Wayland won’t work until the protocol gets significantly changed. I had a similar patch for my compositor, the protocol libs, and Qt where I just let windows specify that they’re rendering at native scale, and I let Qt handle the scale factor as if QT_SCREEN_SCALE_FACTORS had been set accordingly.