Skip to content

wayland: Enable window rules for all xdg-toplevel

Vlad Zahorodnii requested to merge work/zzag/xdg-toplevel-window-rules into master

If a window wants to be initially shown in fullscreen mode, it will issue an xdg_toplevel.set_fullscreen request before the first surface commit.

If a window wants to be shown in fullscreen mode and there hasn't been any first surface commit, kwin will cache the request and apply fullscreen mode when checking window rules in the initialize() function.

On the other hand, window rules are disabled for plasma surfaces. The motivation behind that was to forbid user from messing with plasma's surfaces (this change was suggested during redesign of xdg-shell implementation).

As it turns out, there are cases where plasma may ask to show a window in fullscreen mode, which also has a plasma surface installed, e.g. fullscreen application dashboard.

In order to fix the dashboard, this change allows window rules to be applied to xdg-toplevel windows that also have plasma surfaces installed.

As is, xdg-toplevel surfaces and plasma surfaces are very different in nature. Adding more quirks to handle plasma surfaces in XdgToplevelClient is not worth the effort and there are better alternatives, e.g. layer-shell.

Edited by Vlad Zahorodnii

Merge request reports