[Development] Wayland app_id

Pier Luigi pierluigi.fiorini at gmail.com
Mon Aug 18 15:39:55 CEST 2014


2014-08-14 22:30 GMT+02:00 Robin Burchell <robin+qt at viroteck.net>:
> On Thu, Aug 14, 2014 at 9:52 PM, Pier Luigi <pierluigi.fiorini at gmail.com> wrote:
>>>> Now the question is: how can Qt applications set this app_id?
>>>>
>>>> Since app_id should be the same for all xdg surfaces I would propose
>>>> adding an applicationIdentifier property to QGuiApplication.
>>>
>>> Why do they have to? Just like WM_CLASS is an internal detail to the
>>> xcb plugin, I'd imagine that this would be an internal detail in
>>> QtWayland.
>>
>> At a first and quick glance qxcb sets it to
>> QCoreApplication::applicationName() which is way too verbose and not
>> the desktop entry name, or argv[0] base name which is basically what I
>> did with qtwayland but this doesn't feel right.
>> This doesn't feel right because the desktop entry name might be
>> different than the executable name hence my desire for something that
>> would allow the application to specify it.
>
> It kind of has to be enough, though, because you won't always get
> launched from a desktop file (there's D-Bus activation, or plain old
> exec, shell launching, etc). And what if the property just isn't set?

This has nothing to do with D-Bus activation.
Linux and *BSD applications know what their desktop entry is, their
makefile installs it after all.

> I don't think a new property is a good idea, both because it seems
> incredibly limited in the scope of its usefulness (I don't see how
> it's applicable in a cross platform way, and I don't even know how
> you'd begin to document something this limited in usefulness) and
> because they simply won't set it (partly due to it being a new
> property, and partly because of the previous problem).

I wasn't suggesting to completely remove the heuristics and rely only
on that property, my request was about handling the case where the
desktop entry has a different name.

What about: by default qtwayland uses a heuristics to determine the
app_id (that is argv0 basename).
Applications that for some reason install their desktop entry with a
different name will use QPA and set an application wide property.

Instead of adding a property to QGuiApplication then I propose adding
a QPlatformNativeInterface::setApplicationProperty() or a similar
name.
Does it make sense?

When Wayland will be an officially supported target I guess that this
could be documentation in a platform specific page like this:
http://qt-project.org/doc/qt-5/linux.html

-- 
Out of the box experience
http://www.maui-project.org/



More information about the Development mailing list