RFC wayland-protocols: explicitly allow changing the app_id of a xdg_shell surface at runtime

Jan-Marek Glogowski glogow at fbihome.de
Sun Jul 7 13:38:23 UTC 2019


Hi.

I'm trying to fix Libre Office (LO) to correctly run on Wayland with Qt. My
upstream bug is [1].

IMHO this needs just some changes to QtWayland, but I was told by Sho_ (and
d_ed probably also followed the discussion) that app_id is supposed to be
static like WM_CLASS.

I read the xdg_shell spec[2], but nothing in there expresses this in the
"set_app_id" request description.

Some additional background: LO has a different icon / branding per module,
which is also represented by an icon change of a window, if a user loads a
different document (the whole window changes, but that's not the point here).

Technically LO is just one big process / binary. The multiple desktop entries
just add a command line flag to the starting binary and have different
StartupWMClass, which will match the WM_CLASS of the window.
Likewise there is always just one running process, which will open new
windows and documents, if a 2nd LO is tries to start.

On X11 LO changes the WM_CLASS when it loads a different document, but keeps
the existing window. The user experiences LO as an integrated application
but can see differently grouped apllications per document class in the
task management area, which is the known behaviour.

Same happens when you start LO without any flags, which opens the start center
(a module named desktop) and then changes into the document window based on
the document type. You'll also get back to the start center if you close the
last document.

FWIW changing the appid in Weston works fine. I have a "working" patch [3]
(which AFAI was told is broken because of the 2nd xdg_shell it creates), but
as a POC it works as expected.
>From my POV this is just some clarification to the existing API and won't need
any new version.

So before I start talking with Qt people about changing their API, I would
like to know, if you think this proposed patch to the spec is acceptable?

Is it ok to amend the stable protocol description, like the patch does?

Would this need a new unstable protocol version?

Regards,

Jan-Marek

[1] https://bugs.documentfoundation.org/show_bug.cgi?id=125934
[2] https://gitlab.freedesktop.org/wayland/wayland-protocols/blob/master/stable/xdg-shell/xdg-shell.xml
[3] https://gerrit.libreoffice.org/#/c/74083/




More information about the wayland-devel mailing list