aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2017-03-06 23:21:19 -0800
committerKen Moore <ken@ixsystems.com>2017-03-06 23:21:19 -0800
commit9a1046caedce8f0adf366147c735916aba2c2f84 (patch)
tree6ba989a54e3358a018582ba1c9d8686e828e7dd3 /src-qt5/core
parentAdd support for reading window geometry information to the NativeWindowSystem... (diff)
downloadlumina-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')
-rw-r--r--src-qt5/core/libLumina/NativeWindowSystem.cpp10
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);
+ }
+ }
}
bgstack15