70
Tech Talk: How Electron went Wayland-native, and what it means for your apps | Electron
(www.electronjs.org)
A community for everything relating to the GNU/Linux operating system (except the memes!)
Also, check out:
Original icon base courtesy of lewing@isc.tamu.edu and The GIMP
This is a GNOME problem, not a Wayland problem. The article says "On X11, the window manager typically supplies a window’s title bar and frame decorations. But [...] on Wayland, all you get back from the compositor is a plain rectangle." which makes it sound like this is a Wayland problem, but this isn't true.
Ah I think I might be misunderstanding then.
For this:
Am I misinterpreting that Electron on Wayland now supporting CSD for frameless windows would make it possible for developers currently using them to better mimic the look of Qt or Gtk apps (with shadows and rounded corners, etc.)?
I'm using KDE Plasma and Electron apps sometimes have that sharp-cornered, shadowless window vs the way Qt or Gtk apps are rendered. The most noticeable difference for me is the lack of outline, rounded corners, or shadow.
But do correct me if I'm wrong since I don't know much about Electron development.
Basically, on any sane window manager no matter if Wayland or X11, you'll get the same frame for all apps for free.
From all the big desktops it's only GNOME that somehow decided server-side decorations weren't a good idea implement, and now all Wayland apps have to hand-roll a hacky workaround. The "flat frameless window" look was Electron's GNOME workaround. What the article is describing is a more elaborate GNOME workaround. On e.g. KDE, none of these problems existed in the first place.
That's only mostly true and more importantly not what this is about. Yes Gnome and Mutter don't support server side decorations. But Electron on Linux uses GTK to construct the application window. And GTK offers client side system styled window decorations. Meaning that electron applications aleady supported decorations that look and feel like server side decorations even if they are not.
No, the problem is with custom styled window decorations. Developers who wanted to do CSDs couldn't without major downsides. And that was also true on KDE Plasma, as evidenced by this screenshot from the article you evidently didn't read
See how the window for VS Code doesn't throw a shadow compared to Dolphin? That's because electron didn't support CSDs properly. And now that it does the window looks like this:
That's what we are talking about.
I appreciate the clarification! However, 1. the original comment seemed to be talking about a simple uncustomized frame not looking correct, which sounds like the GNOME problem. And 2. the article still seems to imply Wayland means no SSD, as far as I can tell, which to my knowledge as a general statement isn't true.
Therefore, I apologize for misreading the main intention of the article, but I think there are multiple reasons why people might misread it. Perhaps some clarifications could help?
Yeah, what Vittelius mentioned is correct, it's more that I don't like how most Electron apps on Linux look due to the lack of CSD, causing that flat shadowless look in the screenshot with VS Code next to Dolphin. So, if anything here's to hoping more devs will test their Electron apps on Linux Desktop Environments/windowing systems to make their apps look more native in these environments. But I do appreciate the clarification on SSD, it's nice for me to finally learn the terminology used to describe why I find most Electron apps on Linux to look janky.