Can someone ELI5 why some apps need to support X11/wayland?

3 years ago by nossaquesapao to c/linux

Isn't this supposed to be a job for the window manager?

For example, my virtualbox install has some mouse pointer bugs on wayland, and I can't run waydroid on X. These things are weird to me. Shouldn't window managers abstract all that for the software we run?

load all comments
gabmus 26 points 3 years ago

The application needs to speak a protocol to be able to use it. If you use a X wm your apps need to be able to talk X's protocol to work, if you use a Wayland compositor your apps need to be able to talk Wayland's protocol (or run on Xwayland, which is basically an X server that runs inside Wayland).

The wm/compositor abstractions only work if your apps know how to use them via the correct protocol

path: 0 5358693, hotness: undefined, score: 26, children: 5
nossaquesapao 7 points 3 years ago

I thought that wms worked as full abstraction layers. It helped to reduce my confusion, thanks.

path: 0 5358693 5359424, hotness: undefined, score: 7, children: 4
baseless_discourse 9 points 3 years ago

Typically the abstraction to draw elemnts inside a app window is in the application framework, like GTK, Qt, Electron (chromium), etc.

This is also why apps built with the same framework typically have the same problem on wayland (looking at you, electron).

The abstractions you are thinking of is not in the window manager, which only controls things outside of the main app window, like tiling, border, window top bar, etc.

path: 0 5358693 5359424 5364785, hotness: undefined, score: 9, children: 1
bitwolf 2 points 3 years ago

That is how portals work in Wayland.

For X there was only one protocol, so they all wrote for x.
This also allowed some hacky things to be done that are questionable from a security standpoint afaik.

path: 0 5358693 5359424 5394406, hotness: undefined, score: 2, children: 0
phx 1 point 3 years ago

If you've ever had your WM crash, then you may lose the decorations on your windows, the ability to minimize/maximize them or move them around, but the windows themselves still stick around. Restarting the WM brings that all back as well

path: 0 5358693 5359424 5370801, hotness: undefined, score: 1, children: 0
linux
linux

@lemmy.ml

login for more options
68190
9482
5969

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

  • Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
  • No misinformation
  • No NSFW content
  • No hate speech, bigotry, etc

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

go to feed...