diff options
author | Ken Moore <ken@ixsystems.com> | 2017-03-06 23:30:00 -0800 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2017-03-06 23:30:00 -0800 |
commit | 10e62335dc7f6bc88d793999a917cc4c7be32dfc (patch) | |
tree | 54fa8e1ff7317479739cc806c89987331a45109d /src-qt5/core/libLumina | |
parent | Add support for populating the "Name" property within the NativeWindowSystem ... (diff) | |
download | lumina-10e62335dc7f6bc88d793999a917cc4c7be32dfc.tar.gz lumina-10e62335dc7f6bc88d793999a917cc4c7be32dfc.tar.bz2 lumina-10e62335dc7f6bc88d793999a917cc4c7be32dfc.zip |
Add support for reading the "Workspace" property (_NET_WM_DESKTOP).
Diffstat (limited to 'src-qt5/core/libLumina')
-rw-r--r-- | src-qt5/core/libLumina/NativeWindowSystem.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src-qt5/core/libLumina/NativeWindowSystem.cpp b/src-qt5/core/libLumina/NativeWindowSystem.cpp index 5b56a131..b7b2e6ec 100644 --- a/src-qt5/core/libLumina/NativeWindowSystem.cpp +++ b/src-qt5/core/libLumina/NativeWindowSystem.cpp @@ -385,6 +385,20 @@ void NativeWindowSystem::UpdateWindowProperties(NativeWindow* win, QList< Native win->setProperty(NativeWindow::Name, ( QString::fromLocal8Bit(reply.instance_name)+"::::"+QString::fromLocal8Bit(reply.class_name) )); xcb_icccm_get_wm_class_reply_wipe(&reply); } + } //end NAME property + + if(props.contains(NativeWindow::Workspace)){ + xcb_get_property_cookie_t cookie = xcb_ewmh_get_wm_desktop_unchecked(&obj->EWMH, win->id()); + uint32_t num = 0; + int wkspace = -1; + if(1==xcb_ewmh_get_wm_desktop_reply(&obj->EWMH, cookie, &num, NULL) ){ + if(num!=0xFFFFFFFF){ wkspace = num; } + }/*else{ + //Error in fetching property (not set?) + // - put it on the current screen + out = WM_Get_Current_Desktop(); + }*/ + win->setProperty(NativeWindow::Workspace, wkspace); } } |