From 9df1ec84188e337af87cbfd6778e8b83b209fce8 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 24 Sep 2015 08:43:44 -0400 Subject: Adjust the window workspace detection routine to also check whether the given window is "sticky" in which case it always returns the current workspace. --- libLumina/LuminaX11.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'libLumina/LuminaX11.cpp') diff --git a/libLumina/LuminaX11.cpp b/libLumina/LuminaX11.cpp index 4780f8e0..392d22db 100644 --- a/libLumina/LuminaX11.cpp +++ b/libLumina/LuminaX11.cpp @@ -178,9 +178,17 @@ unsigned int LXCB::WindowWorkspace(WId win){ //qDebug() << "Get Window Workspace"; if(win==0){ return 0; } uint32_t wkspace = 0; + xcb_get_property_cookie_t scookie = xcb_ewmh_get_wm_state_unchecked(&EWMH, win); xcb_get_property_cookie_t cookie = xcb_ewmh_get_wm_desktop_unchecked(&EWMH, win); if(cookie.sequence == 0){ return wkspace; } xcb_ewmh_get_wm_desktop_reply(&EWMH, cookie, &wkspace, NULL); + xcb_ewmh_get_atoms_reply_t reply; + if(1==xcb_ewmh_get_wm_state_reply(&EWMH,scookie, &reply, NULL)){ + //Also check if this window is "sticky", in which case return the current workspace (on all of them) + for(unsigned int i=0; i