Wayland design principles (Re: wayland and gambas)

Pekka Paalanen pekka.paalanen at haloniitty.fi
Tue Apr 30 08:43:31 UTC 2024


On Mon, 29 Apr 2024 22:38:10 +0100
Bruce Steers <bsteers4 at gmail.com> wrote:

> 
> I personally have written many applications with gambas.
> 
> Some have no issue like my text editor for example, a standard looking
> editor with window and title bar.
> 
> Although gambas provides a Settings.Write(window_name) /
> Settings.Read(window_name) that saves/restores the window placement and
> size. It's bearable Wayland does not handle this.

There is a protocol extension in development for saving and restoring
window state:
https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/18

Btw. many protocol extensions are harder to design for Wayland than for
X11, because Wayland needs to consider things like sandbox security.
People tend to try and run arbitrary applications from where-ever, and
it would be better if that can be done inside a secure sandbox (e.g.
flatpak packaged applications) that allows the application to do only
what it is expected to do. Roughly similar to like Android has
application permissions. Therefore Wayland features fundamental for most
applications cannot rely on things that could be considered security
holes.

> Other applications I have made include a customizable LCD clock that runs
> at startup and places itself "where I want it"
> 
> And a program called Desktop-ish that shows .desktop file folders I can
> customize/add and has many features like customizable menus I have added
> many many things to that are very useful to me.
> 
> This also places itself "where I want it"
> 
> My Linux is very personalized and works very well for my needs. (It's
> awesome 😎)

Where people want to build their own DE-alternative from individual
programs (DE components that are not regular apps), I believe they
turn to the wlr family of protocol extensions:
https://gitlab.freedesktop.org/wlroots/wlr-protocols

These are often found implemented in wlroots based compositors:
https://gitlab.freedesktop.org/wlroots/wlroots

e.g. https://swaywm.org/

> 
> The same could probably be said for many gambas coders.
> 
> Now Wayland has come along and seems to be...
> "you can no longer control window placement, deal with it, why even want
> it?, we decided you don't need it"
> 😕
> 
> It is unacceptable for the many who have customized their Linux world with
> their own work.

This is the difference between regular applications and DE components.
Regular applications have all the restrictions. On the other hand,
people do want to build DEs out of independent components, and that is
what the wlr protocol family has been designed for.

DE components are more or less privileged, because they are expected to
force things like their placement and always-on-top, or have access to
sensitive information like the list of all existing windows. They are
usually explicitly configured by the end user, conveying the end user
wishes that way. Hence the different set of protocols. Regular
applications are expected to not be able to do such things, so that a
random application cannot force its way against end user wishes on any
DE.

Highly integrated ready-made DEs may not want to support independent
DE components. Such DE projects may want to set up the desktop with
minimal end user effort, ensuring it always stays like the DE designers
intended. Running independent DE components would compromise that, and
the result would be even worse if all regular applications had the same
powers as DE components.

Every end user's choice begins with choosing the DE or a compositor. It
is up to them if they want a highly integrated designed by someone
else desktop environment, more freedom to configure things, or build
their own custom thing like from lego blocks. Or go really wild, and
create a new compositor project, perhaps based on some existing Wayland
compositor library to avoid years and years of secondary work.


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20240430/26887dcf/attachment.sig>


More information about the wayland-devel mailing list