Live data from Hacker News

Understanding the working of X11 from the ground up (2017)

magcius.github.io

121–130 of 134 posts

Re: Understanding the working of X11 from the ground up (2017)

#121

What's fascinating to me is that X11 and Windows started at complete opposite ends of the spectrum. Then X11 never managed to be a really effective window manager on a local workstation while Windows became really, really good at remote displays.

I am fascinated by the economy of packing three inaccuracies into that one sentence.

(1) X11 is not a window manager,

(2) There have been several really effective window managers for X11,

(3) MS-Windows has never been good at remote display.

Re: Understanding the working of X11 from the ground up (2017)

#122

Earlier quoted context omitted.

The examples in this link don't work for me in the latest Firefox or Chromium (or Brave) on Linux. https://blog.mecheye.net/2018/03/deconstructing-the-water-ef... Edit: neither does anything here: https://noclip.website/

It doesn't work in Firefox for Mac either. It does in Chrome.

Using Firefox nightly on 2015 Macbook Pro and it works just fine

Re: Understanding the working of X11 from the ground up (2017)

#124
post #74

Earlier quoted context omitted.

> The screenshot tool is just flat out not present when running under Wayland due to the above issue. That's odd - it's present (and functioning) in my Firefox (69.0.1) running on Gnome-on-wayland Firefox is generally quite crashy, however, which I'm guessing is Wayland-related

So Firefox supports screenshots when running on the Gnome compositor, but not running on sway? Looks like we're heading into interesting times where applications are getting tied to certain DEs with little to no cross-compatibility.

IDK. Sway is my daily driver. I just checked Firefox, and the screenshot tool works as expected (including clipboard). So unless GP is talking about capturing non-Firefox windows with that tool, I do not have that issue.

This Firefox instance is running on native Wayland. The only issue I have with it is sometimes the coordinates for the context menu are wrong.

But yeah, there might be compat issues, if some protocols are required for stuff. But Wayland itself is the baseline: you'll always be able to draw windows and interact with them.

What's left to extra protocols isn't guaranteed to work: control of the compositor with a client, for instance (color correction, virtual keyboard, screenshots, window placement, screen geometry, window decorations, etc.) is completely up to the compositor (and the protocols it can speak with the client). So is other stuff, like graphics tablet input (with pressure sensitivity, tile, etc), minimizing windows, window miniatures as used for KDE's taskbar as well, I think.

But then, it's not like everything worked flawlessly everywhere on X either :) And as long as the baseline is solid, we can build on it.

Re: Understanding the working of X11 from the ground up (2017)

#125
post #3
post #2

> I've made a personal decision to leave the Linux, X11, and Wayland worlds mostly behind. I understand X11 has a lot of unfixable problems, but what's wrong with Wayland world?

I'm running Sway WM right now, a Wayland compositor that implements an i3-compatible window manager, and in fact working on the code (hopefully merging my first contribution soon.) I'd say the biggest issue is really maturity. I actually find Wayland to be a surprisingly nice piece of software engineering. I don't know if I like the architecture really, but it comes together fairly nicely in the end. For example, the…

> Sway WM also does not have support for drawing tablets. I found this out, by, well, loading up a drawing program and noticing the lack of pressure sensitivity. So, that's what I'm currently working on.

Hey, thank you for working on this! The other day I plugged a tablet in, and found myself quite dumb with it not working properly. I wanted to have a go at implementing the tablet v2 protocol under wlroots, but it sounds like I'll hack on something else : P

Re: Understanding the working of X11 from the ground up (2017)

#126
post #3

Earlier quoted context omitted.

I'm running Sway WM right now, a Wayland compositor that implements an i3-compatible window manager, and in fact working on the code (hopefully merging my first contribution soon.) I'd say the biggest issue is really maturity. I actually find Wayland to be a surprisingly nice piece of software engineering. I don't know if I like the architecture really, but it comes together fairly nicely in the end. For example, the…

> Sway WM also does not have support for drawing tablets. I found this out, by, well, loading up a drawing program and noticing the lack of pressure sensitivity. So, that's what I'm currently working on. Hey, thank you for working on this! The other day I plugged a tablet in, and found myself quite dumb with it not working properly. I wanted to have a go at implementing the tablet v2 protocol under wlroots, but it so…

No problem. There's some issues with it right now, but feel free to give it some testing at https://github.com/swaywm/sway/pull/4570.

It has been an interesting exercise so far, and frankly a quite pleasant one. Rather than autotools or CMake, many of these projects are using Meson, which is just so much nicer. I also really have learned to appreciate Sway WM's code, which I personally think is quite nice now, after having worked with it (though, admittedly, the ease of segfaulting does make you long for something like Rust.)

Re: Understanding the working of X11 from the ground up (2017)

#127
post #19

Money Quote: > So, a lot of the design of X11 is giving clients and apps a large set of tools to design and implement their app, without any real opinionated design about how an app should be made. An X client can use this tool or that tool to battle this tradeoff or that tradeoffs, and neither is fundamentally a wrong choice. That is something that can not be said about Wayland. Besides the "every frame is perfect"…

Do you have a horse in this race? I ask because the writer's background is in writing Wayland, a lot of other commenters are writing software related to compositing, and there are even a few developers of X Window Systems. I only ask because it's very easy to be cynical online and I'm not sure that this comment comes with much to back it up. There's very much an 'old man shouting at cloud' vibe to it, even if uninten…

I just witnessed how complete ecosystems are destroyed all the time in the name of incremental updates. Some prominent example are Python3, Gnome3 or KDE4. Every time such a transition takes place lots of people that are not full time programmers but are using and creating in the FOSS realm mainly in their spare time have to spend a lot of time to adjust to the radical changes. And every time some useful legacy software just gets lost because the maintainers don't bother with porting and just scrap the thing altogether. A permanently moving target makes FOSS that is dependent on many hobbyists just impossible. Just stop changing things all the time. FOSS is clearly reliant on hobbyists and those usually have real jobs and other things to do in their life.

Re: Understanding the working of X11 from the ground up (2017)

#128
post #126

Earlier quoted context omitted.

> Sway WM also does not have support for drawing tablets. I found this out, by, well, loading up a drawing program and noticing the lack of pressure sensitivity. So, that's what I'm currently working on. Hey, thank you for working on this! The other day I plugged a tablet in, and found myself quite dumb with it not working properly. I wanted to have a go at implementing the tablet v2 protocol under wlroots, but it so…

No problem. There's some issues with it right now, but feel free to give it some testing at https://github.com/swaywm/sway/pull/4570 . It has been an interesting exercise so far, and frankly a quite pleasant one. Rather than autotools or CMake, many of these projects are using Meson, which is just so much nicer. I also really have learned to appreciate Sway WM's code, which I personally think is quite nice now, after…

Thanks again! I might just try this out. Just one small thing: I was expecting this to be a wlroots PR. Why would it be sway-specific?

Re: Understanding the working of X11 from the ground up (2017)

#129
post #126

Earlier quoted context omitted.

No problem. There's some issues with it right now, but feel free to give it some testing at https://github.com/swaywm/sway/pull/4570 . It has been an interesting exercise so far, and frankly a quite pleasant one. Rather than autotools or CMake, many of these projects are using Meson, which is just so much nicer. I also really have learned to appreciate Sway WM's code, which I personally think is quite nice now, after…

Thanks again! I might just try this out. Just one small thing: I was expecting this to be a wlroots PR. Why would it be sway-specific?

wlroots already has first-class drawing tablet support, but the "process input events" parts and the "dispatch input events to clients" parts are separated and it's up to the compositor to connect them in the ways they best see fit.

Re: Understanding the working of X11 from the ground up (2017)

#130
post #74

Earlier quoted context omitted.

So Firefox supports screenshots when running on the Gnome compositor, but not running on sway? Looks like we're heading into interesting times where applications are getting tied to certain DEs with little to no cross-compatibility.

IDK. Sway is my daily driver. I just checked Firefox, and the screenshot tool works as expected (including clipboard). So unless GP is talking about capturing non-Firefox windows with that tool, I do not have that issue. This Firefox instance is running on native Wayland. The only issue I have with it is sometimes the coordinates for the context menu are wrong. But yeah, there might be compat issues, if some protocol…

I may have done something wrong. I am not highly knowledgable here. For example, I just learned of Pipewire.

That said, the problem occurred for me when using the NixOS package firefox-wayland. It is possibly better to use upstream firefox with Wayland, but I have not tried; I am just running firefox on Xwayland for now.

Post reply on HN