Custom Desktop Panel Placement in KWin with Wayland

xdg-shell is the protocol used for “regular” application windows. Despite having “shell” in the name it is not suitable for developing Shell/Desktop environment components as in plasmashell. For example it (by design) doesn’t allow windows to position themselves, which is why the Qt API for it doesn’t work on Wayland.

For developing things like panels you need a different protocol that allows to do things regular application windows can’t do. The de-facto standard for this is the layer-shell protocol, which is used in Plasma for the panel and other things. It allows to place your window in a semantic manner, e.g. “Place it on the top screen edge, offset by 20 pixel”. While Qt by default uses xdg-shell for its windows you can make it use layer-shell using layer-shell-qt

2 Likes