From 48f91b4a3892f8431021e10454cebca33430bb3e Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Tue, 27 Jun 2017 13:27:51 -0400 Subject: Oops - make sure we initialize the EWMH class before using it. --- src-qt5/core/libLumina/NativeWindowSystem.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src-qt5/core/libLumina/NativeWindowSystem.cpp b/src-qt5/core/libLumina/NativeWindowSystem.cpp index 4b9c9e62..5e119baf 100644 --- a/src-qt5/core/libLumina/NativeWindowSystem.cpp +++ b/src-qt5/core/libLumina/NativeWindowSystem.cpp @@ -58,6 +58,12 @@ public: //Functions for setting up these objects as needed bool init_ATOMS(){ + xcb_intern_atom_cookie_t *cookie = xcb_ewmh_init_atoms(QX11Info::connection(), &EWMH); + if(!xcb_ewmh_init_atoms_replies(&EWMH, cookie, NULL) ){ + qDebug() << "Error with XCB atom initializations"; + return false; + } + QStringList atoms; atoms << "WM_TAKE_FOCUS" << "WM_DELETE_WINDOW" << "WM_PROTOCOLS" << "WM_CHANGE_STATE" << "_NET_SYSTEM_TRAY_OPCODE" << "_NET_SYSTEM_TRAY_ORIENTATION" @@ -98,7 +104,7 @@ public: xcb_ewmh_set_supporting_wm_check(&EWMH, wm_window, wm_window); //Now also setup the root event mask on the wm_window status = xcb_request_check( QX11Info::connection(), xcb_change_window_attributes_checked(QX11Info::connection(), wm_window, XCB_CW_EVENT_MASK, value_list)); - if(status!=0){ return false; } + if(status!=0){ return false; } return true; } @@ -204,6 +210,8 @@ bool NativeWindowSystem::start(){ if(ok){ setRoot_supportedActions(); ok = obj->start_system_tray(); + }else{ + qWarning() << "Could not register the WM"; } return ok; } -- cgit