I am aware of the switches you can pass to each app to make it use native wayland, but is there any way to do it globally?

  • boredsquirrel
    link
    fedilink
    arrow-up
    14
    ·
    16 days ago

    You mean Electron?

    The Arch wiki has docs about that.

    For Flatpaks I use the environment variable

    ELECTRON_OZONE_PLATFORM_HINT=wayland
    

    See my dotfiles on github.com/boredsquirrel/dotfiles

    Same possible for Qt QT_QPA_PLATFORM=wayland

    • Fisch@discuss.tchncs.de
      link
      fedilink
      English
      arrow-up
      3
      ·
      15 days ago

      Is there a noticeable benefit to those apps running natively on Wayland vs running through xWayland?

      • boredsquirrel
        link
        fedilink
        arrow-up
        3
        arrow-down
        1
        ·
        15 days ago

        I have not checked this, but as far as I know

        • performance: apps are running on a subset of XOrg and xWayland translates it to Wayland
        • RAM: if you have no XWayland apps anymore you save RAM
        • features: some apps may have more features on XOrg, some may have more on Wayland. OBS on XWayland can record keystrokes, QGis on XWayland has not broken dockable toolbars.
        • Rustmilian@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          ·
          15 days ago
          • performance: apps are running on a subset of XOrg and xWayland translates it to Wayland

          “translates it to Wayland” is not correct, XWayland is an X server that runs on Wayland, not a translation layer.

          • RAM: if you have no XWayland apps anymore you save RAM

          True. 👍

          • features: some apps may have more features on XOrg, some may have more on Wayland. OBS on XWayland can record keystrokes, QGis on XWayland has not broken dockable toolbars.

          OBS on Wayland can record keystrokes too, it just that Global hotkeys can be problematic on KDE and requires a work around.

          • boredsquirrel
            link
            fedilink
            arrow-up
            1
            ·
            14 days ago

            an X server that runs on Wayland

            So… isnt the X window translated to a Wayland surface?

            • Rustmilian@lemmy.world
              link
              fedilink
              English
              arrow-up
              2
              ·
              edit-2
              14 days ago

              It does not “translate” or convert X11 windows, but rather forwards them as is over wayland input devices as Wayland surfaces to the underlying Wayland compositor.
              Xwayland server still runs the same code as the regular X server, but relies on the Wayland compositor for presentation and composition of the X11 windows.
              “translation” suggests conversion of X11 API calls or other code, which is not happening here.

              https://wayland.freedesktop.org/xserver.html