Re: [PATCH v3] xdg-shell: use case to change the app ID at runtime
Am 15.07.19 um 16:20 schrieb glo...@fbihome.de: > From: Jan-Marek Glogowski > > LibreOffice is one big binary with explicit brandings for different > application modules. This is represented in X11 by a different > WM_CLASS setting for a window. The WM_CLASS is changed based on the > loaded document at runtime. As a result LibreOffice already offers > multiple desktop files with different icons, StartupWMClass > entries and application names. > > This amendment of the set_app_id request just explicitly specifies > the use case to change a surfaces' app ID at runtime, so a compositor > implementor is made aware of it. Just as the WM_CLASS, a change of > the app ID should result in an update of the propertes of a surface > depending on the app ID, like the window icon specified in the > desktop file or a re-grouping of the surfaces in a task manager. Signed-off-by: Jan-Marek Glogowski ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH v2] xdg-shell: use case to change the app ID at runtime
Am 12.07.19 um 20:31 schrieb Simon Ser: > I'd just go with something among the lines of: > > Like other properties, an app_id request can be sent after the > toplevel has been mapped to update the property. s/an app_id/a set_app_id/ s/toplevel/xdg_toplevel/ Or is toplevel implicit xdg_toplevel? For X11 there are some properties, which would just be effective after unmap + map. For example Qt requires to hide and show a window, if you change the modality of a dialog. I would like to have something like "should be handled" as wording, but I don't know if this is considered too strict (it's should not must, but I'm not used to writing specs this way). ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH] xdg-shell: add use case to handle change of app_id
Am 07.07.19 um 16:11 schrieb Simon Ser: >> @@ -604,6 +604,11 @@ >> For example, "org.freedesktop.FooViewer" where the .desktop file is >> "org.freedesktop.FooViewer.desktop". >> >> +This request can be used to change the icon of a window at runtime by >> +providing different desktop files and changing the app_id. > > I'm not sure this change is necessary. Nothing says this request can't be sent > after the toplevel has been setup. Other requests don't explicitly specify > they > can be sent after setup. It's just that I was told by multiple people "app_id maps to WM_CLASS, so should be considered static". And IMHO it's uncommon / unexpected to change the app_id, so I wanted to mention this use case explicitly so Wayland implementors will be aware of it. >> Windows of >> +the same app_id will still be grouped together, as they are expected >> +to represent the same application from the users point of view. > > This should be left out, because this is compositor policy. Some compositors > don't group by app_id. My intention was to express, that if you change the app_id to change the icon, don't expect that the previous grouping will persist. This is obvious, and from LO POV I want the document windows grouped by type, eventually, so I'm fine skipping it. The compositor may do whatever it want based on the app_id, but LO will be able to offer the correct grouping "hint". ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
RFC wayland-protocols: explicitly allow changing the app_id of a xdg_shell surface at runtime
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/ ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel
[PATCH] xdg-shell: add use case to handle change of app_id
LibreOffice is one big binary with explicit brandings for different application modules. This is represented by different WM_CLASS settings for a window on X11, based on the loaded document. As a result LibreOfiice already offers multiple desktop files with different icons and StartupWMClass entries. This amendment of the set_app_id request just explicitly specifies this use case to change a windows app_id on runtime to change icon and grouping of a window as used by LibreOffice. --- stable/xdg-shell/xdg-shell.xml | 5 + 1 file changed, 5 insertions(+) diff --git a/stable/xdg-shell/xdg-shell.xml b/stable/xdg-shell/xdg-shell.xml index 2e420c6..fd3670f 100644 --- a/stable/xdg-shell/xdg-shell.xml +++ b/stable/xdg-shell/xdg-shell.xml @@ -604,6 +604,11 @@ For example, "org.freedesktop.FooViewer" where the .desktop file is "org.freedesktop.FooViewer.desktop". + This request can be used to change the icon of a window at runtime by + providing different desktop files and changing the app_id. Windows of + the same app_id will still be grouped together, as they are expected + to represent the same application from the users point of view. + See the desktop-entry specification [0] for more details on application identifiers and how they relate to well-known D-Bus names and .desktop files. -- 2.20.1 ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel