GTK4 developer says Mozilla shouldn't use GTK4?

General project discussion.
Use this as a last resort if your topic does not fit in any of the other boards but it still on-topic.
Forum rules
This General Discussion board is meant for topics that are still relevant to Pale Moon, web browsers, browser tech, UXP applications, and related, but don't have a more fitting board available.

Please stick to the relevance of this forum here, which focuses on everything around the Pale Moon project and its user community. "Random" subjects don't belong here, and should be posted in the Off-Topic board.
User avatar
athenian200
Contributing developer
Contributing developer
Posts: 1537
Joined: 2018-10-28, 19:56
Location: Georgia

GTK4 developer says Mozilla shouldn't use GTK4?

Unread post by athenian200 » 2023-10-12, 04:25

I stumbled upon a bug and a reddit post that were rather interesting, where a GTK4 dev is basically telling Mozilla not to bother with moving from GTK3 to GTK4, and saying that if they want their browser to work as intended on Linux, they'll have to speak the Wayland protocol directly after GTK3 is EOL.

https://www.reddit.com/r/gnome/comments ... t/i42g1m5/

https://bugzilla.mozilla.org/show_bug.c ... 701123#c24

The main points that were brought up basically say that Mozilla has too much of it's own stuff with regards to toolkit stuff to be properly served by a GUI toolkit like GTK4, and needs lower level access to function properly than GTK provides, so it basically needs to talk to the underlying protocols directly and shouldn't be relying on GTK at all under the new system.

It's an interesting discussion, and while I can't tell how much (if any) of this applies to UXP, it strongly hints that there may not be an easy path from GTK3 to GTK4, for sure.

Any thoughts on this?
"The Athenians, however, represent the unity of these opposites; in them, mind or spirit has emerged from the Theban subjectivity without losing itself in the Spartan objectivity of ethical life. With the Athenians, the rights of the State and of the individual found as perfect a union as was possible at all at the level of the Greek spirit." -- Hegel's philosophy of Mind

User avatar
RealityRipple
Astronaut
Astronaut
Posts: 666
Joined: 2018-05-17, 02:34
Location: Los Berros Canyon, California

Re: GTK4 developer says Mozilla shouldn't use GTK4?

Unread post by RealityRipple » 2023-10-12, 06:43

XUL+CSS-based system shell for Windows and window manager for Linux, let's goooooo~

vannilla
Moon Magic practitioner
Moon Magic practitioner
Posts: 2194
Joined: 2018-05-05, 13:29

Re: GTK4 developer says Mozilla shouldn't use GTK4?

Unread post by vannilla » 2023-10-12, 07:39

This is a consequence of something that I've seen discussed somewhere else, I think even in this very forum. I wasn't around to actually see this phenomenon over time, but it makes sense given this situation.
In short, as GTK progressed the applications that made the switch were essentially just the small ones, as obviously large codebases require careful planning and all that. This essentially made GTK a self-contained project, where developers come up with ideas, implement them and the only feedback they get is from applications that, in the first place, would have worked regardless of how GTK was structured as long as it provided a wrapper around the low level communication with the OS; effectively, the developers were implementing GTK for themselves, not for real applications in the wild.
Due to this, essential components or functionalities that large applications make use of have been cut short with reasons like "security", "clean code" and so on.

If I remember correctly some discussions I saw in the past this same issue bit Microsoft too, but they already had multiple toolkit APIs so it wasn't that bad and they recovered by adding another API or something like that, which GTK can't do.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35651
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: GTK4 developer says Mozilla shouldn't use GTK4?

Unread post by Moonchild » 2023-10-12, 10:53

It also seems Gnome is wanting to completely drop GTK/Xorg and go Wayland-only. Not sure how we'd be dealing with that.
(Maybe I misunderstand what's happening, just heard the news recently and it wasn't 100% clear what was changing)
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
athenian200
Contributing developer
Contributing developer
Posts: 1537
Joined: 2018-10-28, 19:56
Location: Georgia

Re: GTK4 developer says Mozilla shouldn't use GTK4?

Unread post by athenian200 » 2023-10-12, 11:01

Moonchild wrote:
2023-10-12, 10:53
It also seems Gnome is wanting to completely drop GTK and go Wayland-only. Not sure how we'd be dealing with that.
Yeah, even Mozilla doesn't like this idea. There's even another bug specifically talking about switching to Qt because they want to maintain X11 support. It really looks like they are scrambling to find something that can do what GTK used to do and are looking at Qt as their best candidate overall. The fact that GNOME has obviously gone too far even for Mozilla at this point, and that GTK4 devs are running around the Internet just telling people to find another solution because "we don't support your use case and you'd be dumb to keep using us" says a lot.

Other ideas I've seen floating around involve the possibility that Cinnamon and/or MATE as a project will wind up picking up GTK3 and maintaining it. But yeah, GTK4 is looking like it is not really designed to be used outside of GNOME at all.
"The Athenians, however, represent the unity of these opposites; in them, mind or spirit has emerged from the Theban subjectivity without losing itself in the Spartan objectivity of ethical life. With the Athenians, the rights of the State and of the individual found as perfect a union as was possible at all at the level of the Greek spirit." -- Hegel's philosophy of Mind

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35651
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: GTK4 developer says Mozilla shouldn't use GTK4?

Unread post by Moonchild » 2023-10-12, 11:17

I'm not sure if Qt would provide us with the features we need, tbh. For that matter, Waylands seems to be incomplete as well and just being pushed hard to shove out into the wild. I hear a ton of people through the grapevine complaining about Wayland being unfinished.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
Pentium4User
Board Warrior
Board Warrior
Posts: 1138
Joined: 2019-04-24, 09:38

Re: GTK4 developer says Mozilla shouldn't use GTK4?

Unread post by Pentium4User » 2023-10-12, 12:06

Firefox runs under Wayland, but maybe with a compatibility layer.
Does Pale Moon too?

I still use X.org because mwm doesn't support Wayland.
The profile picture shows my Maico EC30 E ceiling fan.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35651
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: GTK4 developer says Mozilla shouldn't use GTK4?

Unread post by Moonchild » 2023-10-12, 12:37

Pentium4User wrote:
2023-10-12, 12:06
Firefox runs under Wayland, but maybe with a compatibility layer.
Does Pale Moon too?
No idea! Maybe someone can test this?
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
athenian200
Contributing developer
Contributing developer
Posts: 1537
Joined: 2018-10-28, 19:56
Location: Georgia

Re: GTK4 developer says Mozilla shouldn't use GTK4?

Unread post by athenian200 » 2023-10-12, 13:28

Pentium4User wrote:
2023-10-12, 12:06
Firefox runs under Wayland, but maybe with a compatibility layer.
Does Pale Moon too?

I still use X.org because mwm doesn't support Wayland.
Technically speaking, I think most X11 apps run under Wayland if XWayland is used. So I'm pretty sure I have seen Pale Moon running on distros that ship Wayland by default and make it hard to enable an X11 session (like more recent versions of Fedora), but it's definitely XWayland and not directly running on Wayland. Still, it's been a year since I tested and have no idea everything is still fine.
Off-topic:
By the way, also an mwm fan. Was one of my favorite Window Managers back when I used Linux.
"The Athenians, however, represent the unity of these opposites; in them, mind or spirit has emerged from the Theban subjectivity without losing itself in the Spartan objectivity of ethical life. With the Athenians, the rights of the State and of the individual found as perfect a union as was possible at all at the level of the Greek spirit." -- Hegel's philosophy of Mind

User avatar
Basilisk-Dev
Lunatic
Lunatic
Posts: 323
Joined: 2022-03-23, 16:41
Location: Chamber of Secrets

Re: GTK4 developer says Mozilla shouldn't use GTK4?

Unread post by Basilisk-Dev » 2023-10-12, 14:37

Moonchild wrote:
2023-10-12, 11:17
I hear a ton of people through the grapevine complaining about Wayland being unfinished.
I tried using a few desktop environments with Wayland in the past to see what I thought about it and had a ton of issues that do not occur at all for me on X11:

[*] Screen sharing was buggy. It either didn't work or I could only share the application window that was initiating the screensharing.
[*] Stuff like push to talk in chat applications didn't work unless those applications were in focus, so for example if I were playing a video game and wanted to talk with push to talk I had to alt-tab to the voice application.
[*] Nvidia driver support for Wayland was poor at that time, but supposedly that situation has improved.
[*] Stuff like xrandr and xmodmap which make it easy to do certain tasks in X11 outright don't work in Wayland due to being developed originally for X11.
[*] My laptop uses a circular trackpad and the developer of libinput refuses to implement circular scrolling. With X11 I was able to use the old Synaptics driver which supports it.

In addition to the list above, my preferred X11 Window Managers (WindowMaker, XFCE, and Trinity) do not support Wayland. Changing my desktop to use something I don't care that much about is kind of a waste of my time. I just want my computer to work.
Basilisk Project Owner

viewtopic.php?f=61&p=230756

User avatar
CrimsonAkiha
Hobby Astronomer
Hobby Astronomer
Posts: 17
Joined: 2023-09-10, 15:10

Re: GTK4 developer says Mozilla shouldn't use GTK4?

Unread post by CrimsonAkiha » 2023-10-12, 15:16

Off-topic:
Well, this is pretty scary news overall. The whole general direction of "X11 is legacy now, Wayland is the future" seems like another attempt to bulldoze people in the name of sleekness, elegance and "progress." Wayland assumes a lot about what computers it's going to run on -- they even pretty explicitly market it for "modern computers," which pretty much just means "whatever American gamers can afford." They want to render everything with EGL/OpenGL/OpenGLES, but what about devices that don't support those specific graphics APIs, or the latest versions of them? "Just use software rendering." They want to do away with current well-optimized methods of remote desktop and network transparency, what's their replacement? "Just use VNC and video streaming." They want to push out the BSDs and use highly Linux-specific APIs to the point where every client wants to #include <linux/input.h>, what's their justification? "Well the BSDs should simply just become like Linux" (What would be the point in the BSDs even existing then...?)

Wayland and its ecosystem aren't interested at all in being portable, flexible, or well-defined, and the lack of a dependable featureset makes it a miserable experience to consistently develop for it. What X11 provided to deal with the complexity of human interaction is simply dismissed as "hacks" as if the original meaning of "hacker" were some sort of dirty word to them (They call themselves "hackers" anyway, though). People always say "Well if you don't like Wayland, don't use it." and they've always claimed that Wayland will never become the only option, but you can really just tell that it's all smoke and mirrors -- if the attitude these GTK4 developers have is anything to go by, X is destined for the history books, and for some twisted reason we need to have a future where even our terminal emulators require the latest OpenGL ES 3.0 regardless of the fact that xterm managed to provide a more competent terminal just fine without a massively overpowered 3D graphics processor strapped to it, supposedly as far back as the 1980s. Nobody cares that xterm just worked... Just toss it in the landfill with everything else that isn't new, shiny, and converging into the status quo.

You can run X programs on Wayland, but it might not even be possible to do that the other way round depending on your system, precisely by design. They want Mozilla to just "stick with GTK3" for X, but someday soon people will just start complaining about how "old and outdated" GTK3 is. It looks like we're pretty rapidly moving towards a future where there is only GNOME & Chrome. Hey, it even rhymes.

mrnhmath
Fanatic
Fanatic
Posts: 122
Joined: 2017-06-21, 02:37

Re: GTK4 developer says Mozilla shouldn't use GTK4?

Unread post by mrnhmath » 2023-10-12, 15:48

Is anyone really surprised by this? Isn't it just the logical conclusion of all the decisions that GNOME have done in more than a decade? And with all the X11 deprecation threats, how about WE deprecate them? Why did the open source community cling on to something that clearly isn't interested in anyone but themselves, if not for the sweet corporate funding?

Also, if anyone's gotta fork GTK, please go for the extra mile and fork gtk+ 2 instead. Leave CSS for web pages and XUL.

User avatar
Basilisk-Dev
Lunatic
Lunatic
Posts: 323
Joined: 2022-03-23, 16:41
Location: Chamber of Secrets

Re: GTK4 developer says Mozilla shouldn't use GTK4?

Unread post by Basilisk-Dev » 2023-10-12, 15:49

CrimsonAkiha wrote:
2023-10-12, 15:16
Off-topic:
You can run X programs on Wayland, but it might not even be possible to do that the other way round depending on your system, precisely by design. They want Mozilla to just "stick with GTK3" for X, but someday soon people will just start complaining about how "old and outdated" GTK3 is. It looks like we're pretty rapidly moving towards a future where there is only GNOME & Chrome. Hey, it even rhymes.
Off-topic:
It is possible to run Wayland inside of a window inside of X11. You can run Wayland compositors and Wayland-specific applications in such a window. Not ideal, but at least those of us who are sticking to X11 won't be completely cut off from running newer applications.
Basilisk Project Owner

viewtopic.php?f=61&p=230756

User avatar
CrimsonAkiha
Hobby Astronomer
Hobby Astronomer
Posts: 17
Joined: 2023-09-10, 15:10

Re: GTK4 developer says Mozilla shouldn't use GTK4?

Unread post by CrimsonAkiha » 2023-10-13, 16:58

Basilisk-Dev wrote:
2023-10-12, 15:49
Off-topic:
It is possible to run Wayland inside of a window inside of X11. You can run Wayland compositors and Wayland-specific applications in such a window. Not ideal, but at least those of us who are sticking to X11 won't be completely cut off from running newer applications.
Off-topic:
Oh, I had thought of this, but for a lot of people using X11, they're doing it because their hardware or software environment can't really handle Wayland at all. So for the software environment part of the problem, even if it's technically possible to do that on GNU/Linux, it might not be so easy on, say, NetBSD. And as for hardware... well, if your hardware can't handle Wayland and its associated software, then it'll probably have to be software rendered, whether you use it in X11 or not. Which implies a substantial amount of extremely inefficient processing overhead, which may just make that software too slow to even really use, especially on old hardware. So in a lot of cases, you can only really run Wayland in X if you were using X voluntarily anyway. It's worth suggesting, but without this extra information it would only really embolden people who think replacing X with Wayland will only cause minor issues (if any).

dbsoft
Project Contributor
Project Contributor
Posts: 419
Joined: 2020-02-21, 17:35

Re: GTK4 developer says Mozilla shouldn't use GTK4?

Unread post by dbsoft » 2023-10-13, 21:46

GTK3 and 4 have X11 and Wayland backends, so as long as you don't make any direct X11 calls and don't disallow any of the backends it should support both, should detect which windowing system and use it natively. If you use X11 calls directly, you have to specifically request the X11 backend.. likewise if you make any Wayland calls you need to specifically request the Wayland backend. If you specifically request X11, if you have XWayland installed it can run with Wayland, in a sort of emulated environment.

I am still not a fan of Wayland due to a bunch of in my opinion very bad design decisions, so I would not look into following any route that goes Wayland-only. I don't think making the move to GTK4 from GTK3 is that big of a deal, although I also have not been a fan of GTK4 due to new threading restrictions and them simplifying the API to death. However UXP does most of its own drawing so the API simplifying shouldn't be that big of a deal.