Skip to content

Instantly share code, notes, and snippets.

@probonopd
Last active April 29, 2024 01:33
Show Gist options
  • Star 408 You must be signed in to star a gist
  • Fork 8 You must be signed in to fork a gist
  • Save probonopd/9feb7c20257af5dd915e3a9f2d1f2277 to your computer and use it in GitHub Desktop.
Save probonopd/9feb7c20257af5dd915e3a9f2d1f2277 to your computer and use it in GitHub Desktop.
Think twice about Wayland. It breaks everything!

Think twice before abandoning Xorg. Wayland breaks everything!

Hence, if you are interested in existing applications to "just work" without the need for adjustments, then you may be better off avoiding Wayland.

Wayland solves no issues I have but breaks almost everything I need. Even the most basic, most simple things (like xkill) - in this case with no obvious replacement. And usually it stays broken, because the Wayland folks mostly seem to care about Automotive, Gnome, maybe KDE - and alienating everyone else (e.g., people using just an X11 window manager or something like GNUstep) in the process.

Wayland proponents make it seem like Wayland is "the successor" of Xorg, when in fact it is not. It is merely an incompatible alternative, and not even one that has (nor wants to have) feature parity (missing features). And unlike X11 (the X Window System), Wayland protocol designers actively avoid the concept of "windows" (making up incomprehensible words like "xdg_toplevel" instead).

DO NOT USE A WAYLAND SESSION! Let Wayland not destroy everything and then have other people fix the damage it caused. Or force more Red Hat/Gnome components (glib, Portals, Pipewire) on everyone!

Please add more examples to the list.

Wayland seems to be made by people who do not care for existing software. They assume everyone is happy to either rewrite everything or to just use Gnome on Linux (rather than, say, twm with ROX Filer on NetBSD).

Edit: When I wrote the above, I didn't really realize what Wayland even was, I just noticed that some distributions (like Fedora) started pushing it onto me and things didn't work properly there. Today I realize that you can't "install Wayland", because unlike Xorg, there is not one "Wayland display server" but actually every desktop envrironment has its own. And maybe "the Wayland folks" don't "only care about Gnome", but then, any fix that is done in Gnome's Wayland implementation isn't automatically going to benefit all users of Wayland-based software, and possibly isn't even the implementation "the Wayland folks" would necessarily recommend.

Edit 12/2023: If something wants to replace X11 for desktop computers (such as professional Unix workstations), then it better support all needed features (and key concepts, like windows) for that use case. That people also have displays on their fridge doesn't matter the least bit in that context of discussion. Let's propose the missing Wayland protocols for full X11 feature parity.

Wayland is broken by design

  • A crash in the window manager takes down all running applications
  • You cannot run applications as root
  • You cannot do a lot of things that you can do in Xorg by design
  • There is not one /usr/bin/wayland display server application that is desktop environment agnostic and is used by everyone (unlike with Xorg)
  • It offloads a lot of work to each and every window manager. As a result, the same basic features get implemented differently in different window managers, with different behaviors and bugs - so what works on desktop environment A does not necessarily work in desktop environment B (e.g., often you hear that something "works in Wayland", even though it only really works on Gnome and KDE, not in all Wayland implementations). This summarizes it very well: https://gitlab.freedesktop.org/wayland/wayland/-/issues/233

Apparently the Wayland project doesn't even want to be "X.org 2.0", and doesn't want to provide a commonly used implementation of a compositor that could be used by everyone: https://gitlab.freedesktop.org/wayland/wayland/-/issues/233. Yet this would imho be required if they want to make it into a worthwile "successor" that would have any chance of ever fixing the many Wayland issues at the core.

Wayland breaks screen recording applications

  • MaartenBaert/ssr#431 ❌ broken since 24 Jan 2016, no resolution ("I guess they use a non-standard GNOME interface for this")
  • https://github.com/mhsabbagh/green-recorder ❌ ("I am no longer interested in working with things like ffmpeg/wayland/GNOME's screencaster or solving the issues related to them or why they don't work")
  • vkohaupt/vokoscreenNG#51 ❌ broken since at least 7 Mar 2020. ("I have now decided that there will be no Wayland support for the time being. Reason, there is no budget for it. Let's see how it looks in a year or two.") - This is the key problem. Wayland breaks everything and then expects others to fix the wreckage it caused on their own expense.
  • obsproject/obs-studio#2471 ❌ broken since at least 7 Mar 2020. ("Wayland is unsupported at this time", "There isn't really something that can just be easily changed. Wayland provides no capture APIs")
  • There is a workaround for OBS Studio that requires a obs-xdg-portal plugin (which is known to be Red Hat/Flatpak-centric, GNOME-centric, "perhaps" works with other desktops)
  • phw/peek#1191 ❌ broken since 14 Jan 2023. Peek, a screen recording tool, has been abandoned by its developerdue to a number of technical challenges, mostly with Gtk and Wayland ("Many of these have to do with how Wayland changed the way applications are being handled")

As of February 2024, screen recording is still broken utterly on Wayland with the vast majority of tools. Proof

Workaround: Find a Wayland compositor that supports the wlr-screencopy-unstable-v1 protocol and use wf-recorder -a. The default compositor in Raspberry Pi OS (Wayfire) does, but the default compositor in Ubuntu doesn't. (That's the worst part of Wayland: Unlike with Xorg, it always depends on the particular Wayand compositor what works and what is broken. Is there even one that supports everything?)

Wayland breaks screen sharing applications

  • jitsi/jitsi-meet#2350 ❌ broken since 3 Jan 2018
  • jitsi/jitsi-meet#6389 ❌ broken since 24 Jan 2016 ("Closing since there is nothing we can do from the Jitsi Meet side.") See? Wayland breaks stuff and leaves application developers helpless and unable to fix the breakage, even if they wanted.

NOTE: As of November 2023, screen sharing in Chromium using Jitsi Meet is still utterly broken, both in Raspberry Pi OS Desktop, and in a KDE Plasma installation, albeit with different behavior. Note that Pipewire, Portals and whatnot are installed, and even with them it does not work.

Wayland breaks automation software

sudo pkg install py37-autokey

This is an X11 application, and as such will not function 100% on 
distributions that default to using Wayland instead of Xorg.

Wayland breaks Gnome-Global-AppMenu (global menus for Gnome)

Wayland broke global menus with KDE platformplugin

Good news: According to this report global menus now work with KDE platformplugin as of 4/2022

Wayland breaks global menus with non-KDE Qt platformplugins

Wayland breaks AppImages that don't ship a special Wayland Qt plugin

  • https://blog.martin-graesslin.com/blog/2018/03/unsetting-qt_qpa_platform-environment-variable-by-default/ ❌ broke AppImages that don't ship a special Wayland Qt plugin. "This affects proprietary applications, FLOSS applications bundled as appimages, FLOSS applications bundled as flatpaks and not distributed by KDE and even the Qt installer itself. In my opinion this is a showstopper for running a Wayland session." However, there is a workaround: "AppImages which ship just the XCB plugin will automatically fallback to running in xwayland mode" (see below).

Wayland breaks Redshift

Update: Some Wayland compositors (such as Wayfire) now support wlr_gamma_control_unstable_v1, see https://github.com/WayfireWM/wayfire/wiki/Tutorial#configuring-wayfire and jonls/redshift#663. Does it work in all Wayland compositors though?

Wayland breaks global hotkeys

Wayland does not work for Xfce?

See below.

Wayland does not work properly on NVidia hardware?

Apparently Wayland relies on nouveau drivers for NVidia hardware. The nouveau driver has been giving unsatisfactory performance since its inception. Even clicking on the application starter icon in Gnome results in a stuttery animation. Only the proprietary NVidia driver results in full performance.

See below.

Wayland does not work properly on Intel hardware

Wayland prevents GUI applications from running as root

  • https://bugzilla.redhat.com/show_bug.cgi?id=1274451 ❌ broken since 22 Oct 2015 ("No this will only fix sudo for X11 applications. Running GUI code as root is still a bad idea." I absolutely detest it when software tries to prevent me from doing what some developer thinks is "a bad idea" but did not consider my use case, e.g., running truss for debugging on FreeBSD needs to run the application as root. https://bugzilla.mozilla.org/show_bug.cgi?id=1323302 suggests it is not possible: "These sorts of security considerations are very much the way that "the Linux desktop" is going these days".)

Suggested solution

Wayland is biased toward Linux and breaks BSD

  • https://blog.netbsd.org/tnf/entry/wayland_on_netbsd_trials_and ❌ broken since 28 Sep 2020 ("Wayland is written with the assumption of Linux to the extent that every client application tends to #include <linux/input.h> because Wayland's designers didn't see the need to define a OS-neutral way to get mouse button IDs. (...) In general, Wayland is moving away from the modularity, portability, and standardization of the X server. (...) I've decided to take a break from this, since it's a fairly huge undertaking and uphill battle. Right now, X11 combined with a compositor like picom or xcompmgr is the more mature option."

Wayland complicates server-side window decorations

  • https://blog.martin-graesslin.com/blog/2018/01/server-side-decorations-and-wayland/ ❌ FUD since at least 27 January 2018 ("I heard that GNOME is currently trying to lobby for all applications implementing client-side decorations. One of the arguments seems to be that CSD is a must on Wayland. " ... "I’m burnt from it and are not interested in it any more.") Server-side window decorations are what make the title bar and buttons of all windows on a system consistent. They are a must have_ for a consistent system, so that applications written e.g., Gtk will not look entirely alien on e.g., a Qt based desktop, and to enforce that developers cannot place random controls into window titles where they do not belong. Client-side decorations, on the other hand, are destroying uniformity and consistency, put additional burden on application and toolkit developers, and allow e.g., GNOME developers to put random controls (that do not belong there) into window titles (like buttons), hence making it more difficult to achieve a uniform look and feel for all applications regardless of the toolkit being used.

Wayland breaks windows rasing/activating themselves

Wayland breaks RescueTime

Wayland breaks window managers

Apparently Wayland (at least as implemented in KWin) does not respect EWMH protocols, and breaks other command line tools like wmctrl, xrandr, xprop, etc. Please see the discussion below for details.

Wayland requires JWM, TWM, XDM, IceWM,... to reimplement Xorg-like functionality

  • Screen recording and casting
  • Querying of the mouse position, keyboard LED state, active window position or name, moving windows (xdotool, wmctrl)
  • Global shortcuts
  • System tray
  • Input Method support/editor (IME)
  • Graphical settings management (i.e. tools like xranrd)
  • Fast user switching/multiple graphical sessions
  • Session configuration including but not limited to 1) input devices 2) monitors configuration including refresh rate / resolution / scaling / rotation and power saving 3) global shortcuts
  • HDR/deep color support
  • VRR (variable refresh rate)
  • Disabling input devices (xinput alternative)

As it currently stands minor WMs and DEs do not even intend to support Wayland given the sheer complexity of writing all the code required to support the above features. You do not expect JWM, TWM, XDM or even IceWM developers to implement all the featured outlined in ^1.

Wayland breaks _NET_WM_STATE_SKIP_TASKBAR protocol

  • https://github.comelectron/electron#33226 ("skipTaskbar has no effect on Wayland. Currently Electron uses _NET_WM_STATE_SKIP_TASKBAR to tell the WM to hide an app from the taskbar, and this works fine on X11 but there's no equivalent mechanism in Wayland." Workarounds are only available for some desktops including GNOME and KDE Plasma.) ❌ broken since March 10, 2022

Wayland breaks NoMachine NX

Wayland breaks xclip

xclip is a command line utility that is designed to run on any system with an X11 implementation. It provides an interface to X selections ("the clipboard"). Apparently Wayland isn't compatible to the X11 clipboard either.

This is another example that the Wayland requires everyone to change components and take on additional work just because Wayland is incompatible to what we had working for all those years.

Wayland breaks SUDO_ASKPASS

Wayland breaks X11 atoms

X11 atoms can be used to store information on windows. For example, a file manager might store the path that the window represents in an X11 atom, so that it (and other applications) can know for which paths there are open file manager windows. Wayland is not compatible to X11 atoms, resulting in all software that relies on them to be broken until specifically ported to Wayland (which, in the case of legacy software, may well be never).

Possible workaround (to be verified): Use the (Qt proprietary?) Extended Surface Wayland protocol casually mentioned in https://blog.broulik.de/2016/10/global-menus-returning/ "which allows you to set (and read?) arbitrary properties on a window". Is it the set_generic_property from https://github.com/qt/qtwayland/blob/dev/src/extensions/surface-extension.xml?

Wayland breaks games

Games are developed for X11. And if you run a game on Wayland, performance is subpar due to things like forced vsync. Only recently, some Wayland implementations (like KDE KWin) let you disable that.

Wayland breaks xdotool

(Details to be added; apparently no 1:1 drop-in replacement available?)

Wayland breaks xkill

xkill (which I use on a regular basis) does not work with Wayland applications.

What is the equivalent for Wayland applications?

Wayland breaks screensavers

Is it true that Wayland also breaks screensavers? https://www.jwz.org/blog/2023/09/wayland-and-screen-savers/

Wayland breaks setting the window position

Other platforms (Windows, Mac, other destop environments) can set the window position on the screen, so all cross-platform toolkits and applications expect to do the same on Wayland, but Wayland can't (doesn't want to) do it.

  • PCSX2/pcsx2#10179 PCX2 (Playstation 2 Emulator) ❌ broken since 2023-10-25 ("Disables Wayland, it's super broken/buggy in basically every scenario. KDE isn't too buggy, GNOME is a complete disaster.")

Wayland breaks color mangement

Apparently color management as of 2023 (well over a decade of Wayland development) is still in the early "thinking" stage, all the while Wayland is already being pushed on people as if it was a "X11 successor".

https://gitlab.freedesktop.org/pq/color-and-hdr/-/blob/main/doc/color-management-model.md

Wayland breaks DRM leasing

According to Valve, "DRM leasing is the process which allows SteamVR to take control of your VR headset's display in order to present low-latency VR content".

Wayland breaks In-home Streaming

Wayland breaks NetWM

Extended Window Manager Hints, a.k.a. NetWM, is an X Window System standard for the communication between window managers and applications

Wayland breaks window icons

Wayland breaks drag and drop

Workarounds

  • Users: Refuse to use Wayland sessions. Uninstall desktop environments/Linux distributions that only ship Wayland sessions. Avoid Wayland-only applications (such as PreSonus Studio One) (potential workaround: run in https://github.com/cage-kiosk/cage)
  • Application developers: Enforce running applications on X11/XWayland (like LibrePCB does as of 11/2023)

Examples of Wayland being forced on users

This is exactly the kind of behavior this gist seeks to prevent.

References

@Consolatis
Copy link

A warning would be something like "Your wayland session may have the following issues, if you can't accept that or are not comfortable investing time to work around them you may want to keep using the X11 session instead.".

Let Wayland not destroy everything and then have other people fix the damage it caused.

Sounds very different.

@zarlo
Copy link

zarlo commented Apr 22, 2024

Let me make this crystal clear: hating women is NOT acceptable, not now, not ever.

no one here said that is was okay

@baron1405
Copy link

I have been following this thread for over a year and I am still confused as to how we ended up with Wayland. I like analogies so here is one to express my confusion. We had a ship. It was an large old ship. Whether you liked or disliked the ship, you knew how big it was, how to steer it, provision it, sail on it, etc. It was a known quantity. One day, the operators of the ship decided they needed a new ship. They said they did not want a replacement for the old ship, just a new ship. Oh, and by the way the operators were also going to take the old ship out of service. Eventually, the ship builders delivered the new ship. However, what the ship operator received from the ship builders was a diesel engine, a propeller, and a rudder. When the operator asked about the hull and other parts of the ship, they were told by the builders that they had to create those items themselves. Because the operators were not ship builders, this lead to the construction of a very odd ship, full of quirks, missing features, and confusion for passengers who were not accustomed to the novel idiosyncrasies of the new ship.

So please help me understand why, rather than create a full featured replacement for X Window that directly addressed its shortcomings, we ended up with something replacing it that is explicitly not a replacement for it and decentralizes the implementation of key functionality. What I have heard over the year feels like attempts to rationalize the decisions made for Wayland. My interest in this is not just as a developer who relies on X Window features, but as a decades long user and believer in Linux, who is concerned that fragmentation of such core capabilities will hurt the platform.

@Consolatis
Copy link

Consolatis commented Apr 22, 2024

Your analogy isn't perfect. What is missing is that the old ship can be duplicated many times within seconds and you can put a new crew on each of the duplicated old ships.

Regarding why wayland doesn't offer "all the features" I think it boils down to:

  1. xorg didn't offer all the features from the start either, they were added over a long period of time. Writing a completely fully-featured new system from scratch is just not feasible and even if it were, there are just too many potential use-cases to cover that might even contradict themselves.
  2. The wayland-protocols members have a very strict view on some things and prefer enabling use-cases rather than generic features that can be used in bazillion different ways. Add to that that the whole accepting-a-protocol process is *slooow*.
  3. There is also xwayland support in almost every wayland compositor so running (most) X11 applications should not be an issue. This might remove some incentives to support something in a wayland protocol because there exists this fallback path.

@baron1405
Copy link

@Consolatis Thank you for the quick and thoughtful reply.

@Monsterovich
Copy link

Monsterovich commented Apr 23, 2024

xorg didn't offer all the features from the start either, they were added over a long period of time. Writing a completely fully-featured new system from scratch is just not feasible and even if it were, there are just too many potential use-cases to cover that might even contradict themselves.

I'm sick of reading this nonsense. Wayland has been flawed since day one. No amount of time will fix it, because the architecture is just bad.

The wayland-protocols members have a very strict view on some things and prefer enabling use-cases rather than generic features that can be used in bazillion different ways. Add to that that the whole accepting-a-protocol process is slooow.

Okay, everyone's already realized that Wayland-CСP are jerks. Where the fck is the library with all the display server features? Where the fck is it?

There is also xwayland support in almost every wayland compositor so running (most) X11 applications should not be an issue. This might remove some incentives to support something in a wayland protocol because there exists this fallback path.

Stop lying, XWayland won't run half of the applications, and those that it does run, run with limitations.

@gustavosbarreto
Copy link

xorg didn't offer all the features from the start either, they were added over a long period of time. Writing a completely fully-featured new system from scratch is just not feasible and even if it were, there are just too many potential use-cases to cover that might even contradict themselves.

Yeah, Xorg was made in a different time when tech was way simpler. Hardware and software were way less advanced back then. Also, for something trying to replace Xorg and being the standard for many Linux distros, it can't start off incomplete like that. Wayland should've come out stronger right from the start if it wants to be the go-to choice for everyone.

@Monsterovich
Copy link

Yeah, Xorg was made in a different time when tech was way simpler. Hardware and software were way less advanced back then.

The hardware and software remains exactly the same. All that has changed is mostly hardware performance.

@gustavosbarreto
Copy link

Yeah, Xorg was made in a different time when tech was way simpler. Hardware and software were way less advanced back then.

The hardware and software remains exactly the same. All that has changed is mostly hardware performance.

Really? Did we have DRI back in the '80s? Over the years, Xorg got a bunch of extensions like Xinerama, RANDR, and more to tackle current issues. Saying Xorg was "incomplete" from the start isn't an excuse for Wayland's limitations. It aims to replace what Xorg does now, not what Xorg did decades ago.

@Monsterovich
Copy link

Monsterovich commented Apr 23, 2024

@gustavosbarreto

Really? Did we have DRI back in the '80s? Over the years, Xorg got a bunch of extensions like Xinerama, RANDR, and more to tackle current issues.

These are improvements regarding the graphical stack that followed the development of hardware. Wayland has not invented anything new. It's just some stupid desire to "be different" for the sake of showing off or something like that.

No one back then even seriously thought of making a bunch of incompatible graphical servers with different protocols for each DE. This option has always been unsustainable.

Saying Xorg was "incomplete" from the start isn't an excuse for Wayland's limitations. It aims to replace what Xorg does now, not what Xorg did decades ago.

Absolutely agree, all the developers had to do was make an improved version of X11 and Xserver without reinventing the wheel. Either that or nothing at all.

Wayland, however, is a complete deception. First it was that Wayland was "X12", then Wayland was just a replacement for X11/Xorg. Now its fanatics are giving up and promoting it as "an incompatible modern alternative that must destroy everything before it, because the old must die. Why? Because we can."

@zarlo
Copy link

zarlo commented Apr 23, 2024

I'm sick of reading this nonsense. Wayland has been flawed since day one. No amount of time will fix it, because the architecture is just bad.

okay @Monsterovich so you have made this claim are you able to prove it? (this is not a gotcha i would like to know)

@hendrack
Copy link

Wayland, however, is a complete deception. First it was that Wayland was "X12", then Wayland was just a replacement for X11/Xorg. Now its fanatics are giving up and promoting it as "an incompatible modern alternative that must destroy everything before it, because the old must die. Why? Because we can."

The more I read about Wayland the more I get the impression what started as a technical issue is now rooted in ideology, almost like a social engineering op.

@birdie-github
Copy link

birdie-github commented Apr 23, 2024

@Consolatis

xorg didn't offer all the features from the start either, they were added over a long period of time. Writing a completely fully-featured new system from scratch is just not feasible and even if it were, there are just too many potential use-cases to cover that might even contradict themselves.

@gustavosbarreto

Really? Did we have DRI back in the '80s? Over the years, Xorg got a bunch of extensions like Xinerama, RANDR, and more to tackle current issues. Saying Xorg was "incomplete" from the start isn't an excuse for Wayland's limitations. It aims to replace what Xorg does now, not what Xorg did decades ago.

This is a garbage reply/counter-argument.

The XFree86/Xorg server later on offered the same featureset for all its users. At no time people dealt with different levels of implementation of X11 on Linux.

This is exactly the case with Wayland. Multiple Wayland protocols are not mandatory, and the experience and features that you're getting with compositor X for Wayland could be radically different from compositor Y.

The wayland-protocols members have a very strict view on some things and prefer enabling use-cases rather than generic features that can be used in bazillion different ways. Add to that that the whole accepting-a-protocol process is slooow.

Desktop users need none of this shit. Wayland was promised to be a better X11/Xorg out of the box. It's still not by a long shot. Microsoft replaced the entire graphics stack in Vista (and moved it into user space for good measure) and even low-level Windows XP and earlier applications continued to work just fine. Some very rare applications broke, e.g. those that hooked into low-level Windows features with no public APIs, e.g. WindowBlinds, but those worked against Microsoft's will and guidelines. There's no concept of private APIs in Linux.

There is also xwayland support in almost every wayland compositor so running (most) X11 applications should not be an issue. This might remove some incentives to support something in a wayland protocol because there exists this fallback path.

Another garbage reply. XWayland is good only for running basic single-window applications because everything else is broken.

@birdie-github
Copy link

@baron1405

Your analogy is almost perfect, except you were talking about this:

However, what the ship operator received from the ship builders was a diesel engine, a propeller, and a rudder.

No, they didn't receive even that. They received blueprints for certain parts of the new ship. And those blueprints were quite vague as to whether you needed to be put them in place or not, thus we now have multiple ships, some of which are missing toilets, others are missing hallways or kitchen, others have no poles, etc. etc. etc.

And now we have multiple ships where only few selected come with all the amenities but it's claimed that they are all better than the old clunky ship.

@zarlo
Copy link

zarlo commented Apr 23, 2024

Wayland is just a spec where x11 is a spec and implementation

@Monsterovich
Copy link

I'm sick of reading this nonsense. Wayland has been flawed since day one. No amount of time will fix it, because the architecture is just bad.

okay @Monsterovich so you have made this claim are you able to prove it? (this is not a gotcha i would like to know)

I (and others) in this thread have already written thousands of proofs that Wayland is flawed, and I already post in circles sometimes.

@Monsterovich
Copy link

@zarlo

Wayland is just a spec where x11 is a spec and implementation

The fact that Wayland is just a spec (and every DE has their own) is VERY BAD. The reason for this is fragmentation.

@probonopd
Copy link
Author

probonopd commented Apr 23, 2024

Wayland is just a spec where x11 is a spec and implementation

Well. X11 is the spec and Xorg is just one of multiple implementations, but the one practically everyone is using on the *nix desktop.

Contrast this with Wayland where not even Gnome and KDE use the same implementation, and hence are broken in different ways (as in: different features supported, different bugs).

@dm17
Copy link

dm17 commented Apr 26, 2024

Wayland, however, is a complete deception. First it was that Wayland was "X12", then Wayland was just a replacement for X11/Xorg. Now its fanatics are giving up and promoting it as "an incompatible modern alternative that must destroy everything before it, because the old must die. Why? Because we can."

The more I read about Wayland the more I get the impression what started as a technical issue is now rooted in ideology, almost like a social engineering op.

100%

Use DNS level adblocking, it's literally a stock Android feature (Settings > Network > Private DNS) that I don't know why more people don't use.

That isn't a solution when you realize how few adverts it can block versus ublock.

The folks behind Wayland are also the ones behind Flatpak, right?

Don't you want to be part of their wonderful utopia? Wayland + systemD + flatpak + ... secure boot with Google/Intel/AMD/Apple at the root-of-trust. Being able to enforce DRM (amongst other things) onto everyone will give us all a century of the Linux Desktop! Utopia!

@binex-dsk
Copy link

Don't you want to be part of their wonderful utopia? Wayland + systemD + flatpak + ... secure boot with Google/Intel/AMD/Apple at the root-of-trust

I bet if you repeat the same strawman slop 100 more times it'll eventually be funny.

@bodqhrohro
Copy link

import gi

gi.require_version("Gtk", "3.0")
from gi.repository import Gtk, Gdk

offset_x = 0
offset_y = 0

def press(widget, event):
    global offset_x, offset_y
    offset_x = event.x
    offset_y = event.y

def move(widget, event):
    win.move(event.x_root - offset_x, event.y_root - offset_y)

win = Gtk.Window()
win.connect("destroy", Gtk.main_quit)
win.connect("button-press-event", press)
win.connect("motion-notify-event", move)
win.set_events(Gdk.EventMask.BUTTON1_MOTION_MASK|Gdk.EventMask.KEY_PRESS_MASK)
win.show_all()
Gtk.main()
xdecor1.mp4

If someone promoted something like libdecor for any X clients decades ago, we wouldn't need window managers for X.Org in the first place.

BTW, found this in Xnest logs: http://selinuxproject.org/page/NB_XWIN

@bodqhrohro
Copy link

bodqhrohro commented Apr 28, 2024

You don't need a ship at all if all you need in reality is a bunch of boats.

https://en.wikipedia.org/wiki/Cossack_raid_on_Istanbul_(1615)

But ship lovers keep assuring you need a full-fledged ship to win.

@Consolatis
Copy link

That is some very weird example for you to pick. Movement of windows should belong to the user (e.g. the compositor) rather than to random applications. Anyway, running it with GDK_BACKEND=x11 (and thus via xwayland) magically makes it work for me.

@bodqhrohro
Copy link

That is some very weird example for you to pick

Wayland haters criticize Red Hat, GOOME or whatever for attempting to push libdecor onto everyone and enforce all the Wayland clients to support CSD, instead of accepting that every compositor should support SSD as an option and not mandate simplistic clients to support CSD, regardless of the Wayland spec.

My point is to demonstrate that X clients can in fact support CSD too, and talk to the X server directly instead of relying on some window manager to draw decorations for them and to provide ability to move and resize their windows. So if they massively did, it wouldn't be crucial to also run some window manager along with X.Org.

A decade ago, I already was willing to ditch any window managers and only use pure X.Org and small UNIX-way utilities to manage the windows. But discovered that such tools don't work without any WM at all somehow (and only years later discovered the reason: that they actually talk not to X.Org but to a WM via EWMH, and it does not even work with any WM). I was highly frustrated that if I kill a WM, X clients become totally helpless, I couldn't even change their z-order, not even focus them if I have X-Mouse disabled. Some simpler apps had CLI flags or other means to specify their initial geometry, but more normie things like browsers just launched their windows with some default geometry, not even occupying the whole screen by default as I wished.

@bodqhrohro
Copy link

bodqhrohro commented Apr 28, 2024

Oh, I just checked that GTK+3 CSD apps in fact support window manipulations with pure X server and no WM too. So I did not even need to write an artificial example, hehe. Just the maximize button doesn't work (it probably works via EWMH on X11 as well).

@bodqhrohro
Copy link

Instead of the quirky conception of struts, I would implement the non-fullscreen maximization in a way where every window advertises its geometry to others, and tells if it allows collisions or not. Something like it happens in game engines (2D or 3D, doesn't matter). X clients would then, when changing their window geometries, query all the other windows and check if there is any room for them. Just like when you join some Minecraft server and look for an unoccupied area for your buildings lol.

How is it better than struts? Panels may occupy not the whole screen side, but only a part. Thus some space around remains, where a wallpaper can be usually seen through. There's no reason non-maximized window cannot occupy this space, but that's exactly how struts work! It would also provide a simple way to avoid physical notches: just put a dummy non-colliding window there.

Oh, and of course, if some non-colliding window appears, or changes its geometry, it should send a «посунься!!!» signal to other windows, just in the case they already occupy some space where it is supposed to appear. It could even query their geometries first and send such a signal only to those who actually occupy some space there, neat? Just make sure to avoid race conditions… somehow… transactions? And to manage conflicts, like what if two non-colliding windows claim overlapping regions the same time, what would happen?

@Consolatis
Copy link

Sounds like fun to implement in every single application. And if the application doesn't implement it you can't move the window at all as a user. Doesn't sound that great to me. Not even starting to think about features like snap to edge.

@bodqhrohro
Copy link

And if the application doesn't implement it you can't move the window at all as a user.

Some think splash screens are in fact a feature.

They always were frustrating to me, and I'm glad that for Word 2007 in Wine I can omit them and switch to other window anyway by putting a splash screen down, unlike for Word 2007 on Windows (but I suspect, even there it's possible to force it down via some 3rd party tools).

@zarlo
Copy link

zarlo commented Apr 29, 2024

i hate splash screens like why show some thing just to hide it and like 99% of them dont set a sane _NET_WM_WINDOW_TYPE so tiling window managers dont know to make them auto flow

@bodqhrohro
Copy link

bodqhrohro commented Apr 29, 2024

The point is to discourage the user from doing anything while the app is launched so it is launched as fast as possible and nothing interferes with the process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment