If anyone wants to give an ELI5 or a link to a video that ELI5 I’d be incredibly thankful

I swear that all the stuff I find is like super in depth technical stuff that just loses me in no time flat

  • loutr
    link
    fedilink
    arrow-up
    37
    ·
    8 months ago

    Because having each piece of software do it itself would be not only chaos but a massive security concern.

    Not really, the main point is that (most) apps don’t know where they are on the screen, whether they’re minimized, on the active workspace, … and they don’t care either. That’s the responsibility of the window manager.

    The app tells the display server “I need a window to display these pixels” and that’s it. And the window manager, well, manages these windows.

    On the topic of security, X11 doesn’t handle security at all, that’s one of the main issues. So any graphical app can read the other windows’ pixels, grab everything you type, everything you copy, … OTOH Wayland isolates apps so they can’t do that by default. Apps that really need to (screenshot apps, …) can use “portals” to ask for these permissions.

    • Gormadt@lemmy.blahaj.zoneOP
      link
      fedilink
      arrow-up
      16
      ·
      8 months ago

      That’s really interesting and thank you

      I think I’m beginning to get it now, and Wayland does sound better than X11 at least

      • bisby@lemmy.world
        link
        fedilink
        English
        arrow-up
        22
        ·
        8 months ago

        I use wayland, but be warned that there are downsides.

        X11 is 40 years old. Which means that even though it has 40 years of bad decisions baked into it, it also has 40 years of features and tooling built around it.

        And in some cases, things are purposefully broken in the name of security as mentioned above. Writing a keylogger on X11? Easy. Every app can watch the keyboard even when they aren’t in focus. So if I type my password into firefox, Discord can listen. Hope you don’t have any malicious apps just patiently listening to all your keystrokes.

        Getting rid of input listening sounds great! … Except for the concept of global keybinds. Have a Push to talk button in discord that you need it to be able to listen to while youre playing a game? Sorry, the game is in focus, so discord can’t see ANY of your input. Including the push to talk button. Different wayland servers have different ways of handling this with their portals. Some don’t have it at all. And the ones that do don’t always have great solutions.

        One major issue that has been in wayland debate hell… how do multi-window apps communicate with each other. For example GIMP. The editor window is a separate window from the toolkit which is a separate from the layer view. GIMP on X11 knows where all of its windows are because it can see everything. if you wanted GIMP to save all the window positions, it could. GIMP on Wayland has no idea where each window is relative to each other. Each window knows its own size and shape. And thats it. It doesnt know where on the screen it is. Which means it doesnt know where it’s other sub windows are relative to itself. Which means GIMP on Wayland can’t really save the window positions for next run. Wayland is working on a protocol for handling this, but its been caught up in debate hell last I saw. This is a prime example of a thing X11 had. And Wayland will someday have, but the 40 year headstart and disregard for security gives X11 a huge headstart.

        Most of these problems have workarounds and solutions, but you might find yourself in a situation where you do in fact need to implement a workaround instead of having everything Just Work.

        “Better” means different things to different people. Architecture and security and technologically? Wayland is better. Just Works and its what your apps were probably built to run on so less weird edge case issues? X11 is still better just due to inertia. (And again, I use Wayland, I’m willing to deal with the workarounds, but you do you).

    • oo1@kbin.social
      link
      fedilink
      arrow-up
      5
      ·
      8 months ago

      Does it also handle key and mouse inputs to make sure they’re interpretted by the right programme in the right context?

      • loutr
        link
        fedilink
        arrow-up
        5
        ·
        8 months ago

        Yep that’s also the WM’s job.