diff options
author | Ken Moore <ken@ixsystems.com> | 2017-03-07 00:05:03 -0800 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2017-03-07 00:05:03 -0800 |
commit | 6369afd1724587e1fd54c58258b6e6d84fa4c820 (patch) | |
tree | ee401114e52fdbcd677f45c8a58d565ca8ef66e3 | |
parent | Finish up some more of the admin functions for the NativeWindowSystem (event ... (diff) | |
download | lumina-6369afd1724587e1fd54c58258b6e6d84fa4c820.tar.gz lumina-6369afd1724587e1fd54c58258b6e6d84fa4c820.tar.bz2 lumina-6369afd1724587e1fd54c58258b6e6d84fa4c820.zip |
Make sure we respect the "override_redirect" flag on a window (do not try to manage it)
-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 7c7f11f7..723415f2 100644 --- a/src-qt5/core/libLumina/NativeWindowSystem.cpp +++ b/src-qt5/core/libLumina/NativeWindowSystem.cpp @@ -413,6 +413,11 @@ void NativeWindowSystem::RegisterVirtualRoot(WId){ void NativeWindowSystem::NewWindowDetected(WId id){ //Make sure this can be managed first if(findWindow(id) != 0){ return; } //already managed + xcb_get_window_attributes_cookie_t cookie = xcb_get_window_attributes(QX11Info::connection(), id); + xcb_get_window_attributes_reply_t *attr = xcb_get_window_attributes_reply(QX11Info::connection(), cookie, NULL); + if(attr == 0){ return; } //could not get attributes of window + if(attr->override_redirect){ free(attr); return; } //window has override redirect set (do not manage) + free(attr); //Register for events from this window #define FRAME_WIN_EVENT_MASK (XCB_EVENT_MASK_BUTTON_PRESS | \ XCB_EVENT_MASK_BUTTON_RELEASE | \ @@ -436,6 +441,11 @@ void NativeWindowSystem::NewWindowDetected(WId id){ void NativeWindowSystem::NewTrayWindowDetected(WId id){ //Make sure this can be managed first if(findTrayWindow(id) != 0){ return; } //already managed + xcb_get_window_attributes_cookie_t cookie = xcb_get_window_attributes(QX11Info::connection(), id); + xcb_get_window_attributes_reply_t *attr = xcb_get_window_attributes_reply(QX11Info::connection(), cookie, NULL); + if(attr == 0){ return; } //could not get attributes of window + if(attr->override_redirect){ free(attr); return; } //window has override redirect set (do not manage) + free(attr); //Register for events from this window #define FRAME_WIN_EVENT_MASK (XCB_EVENT_MASK_BUTTON_PRESS | \ XCB_EVENT_MASK_BUTTON_RELEASE | \ |