As I understand it, X11 has many inherent security concerns, including programs being able to read the contents of other windows and intercept keystrokes. Wayland addresses these concerns but at the moment breaks certain functions like screen readers, cursor warping, and the ability of a program to resize its own window.

I am curious as to how the display protocols of MacOS and Windows handle these situations differently. How does a program in those operating systems gain permission to read the contents of other windows, if at all? What is to be done in Wayland for these functions to be more seamless or are there inherent obstacles?

  • Max-P@lemmy.max-p.me
    link
    fedilink
    arrow-up
    29
    arrow-down
    1
    ·
    5 months ago

    Not sure if Windows has that but I believe on macOS what happens is the app tries to record the screen, and if it fails macOS blocks the request and opens the security settings to enable the permission, and you have restart the whole application for the permission to take.

    What’s done for Wayland is the portal system: applications can use portals to request access to specific things like screen recording, the DE does what it needs to do and it starts feeding the data to the application through the portal. It’s working fairly well, I haven’t had issues with those in a while. The application just requests what it wants, and the DE prompts the user (or auto accept the request) optionally remembering the choice as well.

    Generally the solution for X11 problems is to implement a modern API for it in either Wayland or as a portal. Which breaks old stuff, but once updated it works fine.

    The main obstacle is getting Gnome to agree to the protocols.

    • vrighter@discuss.tchncs.de
      link
      fedilink
      arrow-up
      4
      ·
      5 months ago

      except the portal keeps popping up whenever I touch my controller, and the remember option does not work. It pops up in the foreground anytime I even accidentallytouch my contoller’s touchpad. In home streaming is basically impossible for me rn.

      • Zamundaaa@discuss.tchncs.de
        link
        fedilink
        English
        arrow-up
        4
        ·
        5 months ago

        That’s not really a Wayland thing, that’s an (apparently badly implemented) attempt to bridge X11 apps to a permission system they were never written for.

      • ReversalHatchery@beehaw.org
        link
        fedilink
        English
        arrow-up
        1
        ·
        5 months ago

        What controller? That does not seem to be a problem with the portal concept, but a pretty weird bug in the implementation of some part of it.