diff options
author | Ken Moore <ken@ixsystems.com> | 2017-03-06 23:21:19 -0800 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2017-03-06 23:21:19 -0800 |
commit | 9a1046caedce8f0adf366147c735916aba2c2f84 (patch) | |
tree | 6ba989a54e3358a018582ba1c9d8686e828e7dd3 /src-qt5/core/libLumina | |
parent | Add support for reading window geometry information to the NativeWindowSystem... (diff) | |
download | lumina-9a1046caedce8f0adf366147c735916aba2c2f84.tar.gz lumina-9a1046caedce8f0adf366147c735916aba2c2f84.tar.bz2 lumina-9a1046caedce8f0adf366147c735916aba2c2f84.zip |
Add support for populating the "Name" property within the NativeWindowSystem class (associated with the much more static "class" name from X11 - use the Title/ShortTitle properties for the ones that change regularly).
Diffstat (limited to 'src-qt5/core/libLumina')
-rw-r--r-- | src-qt5/core/libLumina/NativeWindowSystem.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src-qt5/core/libLumina/NativeWindowSystem.cpp b/src-qt5/core/libLumina/NativeWindowSystem.cpp index d7c95fb8..5b56a131 100644 --- a/src-qt5/core/libLumina/NativeWindowSystem.cpp +++ b/src-qt5/core/libLumina/NativeWindowSystem.cpp @@ -376,6 +376,16 @@ void NativeWindowSystem::UpdateWindowProperties(NativeWindow* win, QList< Native } } //end of geometry properties + if(props.contains(NativeWindow::Name)){ + //Put the app/class name here (much more static than the "Title" properties + xcb_get_property_cookie_t cookie = xcb_icccm_get_wm_class_unchecked(QX11Info::connection(), win->id()); + xcb_icccm_get_wm_class_reply_t reply; + if(1 == xcb_icccm_get_wm_class_reply(QX11Info::connection(), cookie, &reply, NULL) ){ + //Returns: "<instance name>::::<class name>" + win->setProperty(NativeWindow::Name, ( QString::fromLocal8Bit(reply.instance_name)+"::::"+QString::fromLocal8Bit(reply.class_name) )); + xcb_icccm_get_wm_class_reply_wipe(&reply); + } + } } |