From ac4dd2a253d5e7aa5972d80d49cf643ac0111e6a Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 12 Nov 2015 14:25:06 -0500 Subject: Add a couple more XCB EWMH functions. One change required a re-definition of an enumeration (WINDOWSTATE -> WINDOWVISIBILITY), so I fixed the usage of that enum in the lumina-desktop project as well. --- libLumina/LuminaX11.cpp | 133 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 129 insertions(+), 4 deletions(-) (limited to 'libLumina/LuminaX11.cpp') diff --git a/libLumina/LuminaX11.cpp b/libLumina/LuminaX11.cpp index a5592c8e..d9dab41c 100644 --- a/libLumina/LuminaX11.cpp +++ b/libLumina/LuminaX11.cpp @@ -287,13 +287,13 @@ QList LXCB::WindowFrameGeometry(WId win){ } // === WindowState() === -LXCB::WINDOWSTATE LXCB::WindowState(WId win){ +LXCB::WINDOWVISIBILITY LXCB::WindowState(WId win){ if(DEBUG){ qDebug() << "XCB: WindowState()"; } if(win==0){ return IGNORE; } xcb_get_property_cookie_t cookie = xcb_ewmh_get_wm_state_unchecked(&EWMH, win); if(cookie.sequence == 0){ return IGNORE; } xcb_ewmh_get_atoms_reply_t states; - WINDOWSTATE cstate = IGNORE; + WINDOWVISIBILITY cstate = IGNORE; //First Check for special states (ATTENTION in particular); if( 1 == xcb_ewmh_get_wm_state_reply(&EWMH, cookie, &states, NULL) ){ for(unsigned int i=0; i LXCB::WM_Get_Window_Type(WId win){ + // Note: This will silently discard any unknown/non-standard window type flags + // The client should ensure to set at least one standardized type flag per the specifications. + QList out; + xcb_get_property_cookie_t cookie = xcb_ewmh_get_wm_window_type_unchecked(&EWMH, win); + xcb_ewmh_get_atoms_reply_t reply; + if(1==xcb_ewmh_get_wm_window_type_reply(&EWMH, cookie, &reply, NULL) ){ + for(unsigned int i=0; i list){ + //Convert to the XCB format + xcb_atom_t array[list.length()]; + for(int i=0; i LXCB::WM_Get_Window_States(WId win){ + QList out; + xcb_get_property_cookie_t cookie = xcb_ewmh_get_wm_state_unchecked(&EWMH, win); + xcb_ewmh_get_atoms_reply_t reply; + if(1==xcb_ewmh_get_wm_state_reply(&EWMH, cookie, &reply, NULL) ){ + for(unsigned int i=0; i list){ + //Convert to the XCB format + xcb_atom_t array[list.length()]; + for(int i=0; i