diff options
-rw-r--r-- | libLumina/LuminaX11.cpp | 36 | ||||
-rw-r--r-- | libLumina/LuminaX11.h | 10 | ||||
-rw-r--r-- | lumina-desktop/LSession.cpp | 5 | ||||
-rw-r--r-- | lumina-desktop/LWinInfo.cpp | 8 |
4 files changed, 47 insertions, 12 deletions
diff --git a/libLumina/LuminaX11.cpp b/libLumina/LuminaX11.cpp index 199dd6ed..43d4e577 100644 --- a/libLumina/LuminaX11.cpp +++ b/libLumina/LuminaX11.cpp @@ -1012,7 +1012,7 @@ LXCB::WINDOWSTATE LXCB::WindowState(WId win){ } // === WindowVisibleIconName() === -QString LXCB::WindowVisibleIconName(WId win){ //_WM_VISIBLE_ICON_NAME +QString LXCB::WindowVisibleIconName(WId win){ //_NET_WM_VISIBLE_ICON_NAME QString out; xcb_get_property_cookie_t cookie = xcb_ewmh_get_wm_visible_icon_name_unchecked(&EWMH, win); if(cookie.sequence == 0){ return out; } @@ -1024,7 +1024,7 @@ QString LXCB::WindowVisibleIconName(WId win){ //_WM_VISIBLE_ICON_NAME } // === WindowIconName() === -QString LXCB::WindowIconName(WId win){ //_WM_ICON_NAME +QString LXCB::WindowIconName(WId win){ //_NET_WM_ICON_NAME QString out; xcb_get_property_cookie_t cookie = xcb_ewmh_get_wm_icon_name_unchecked(&EWMH, win); if(cookie.sequence == 0){ return out; } @@ -1036,7 +1036,7 @@ QString LXCB::WindowIconName(WId win){ //_WM_ICON_NAME } // === WindowVisibleName() === -QString LXCB::WindowVisibleName(WId win){ //_WM_VISIBLE_NAME +QString LXCB::WindowVisibleName(WId win){ //_NET_WM_VISIBLE_NAME QString out; xcb_get_property_cookie_t cookie = xcb_ewmh_get_wm_visible_name_unchecked(&EWMH, win); if(cookie.sequence == 0){ return out; } @@ -1048,7 +1048,7 @@ QString LXCB::WindowVisibleName(WId win){ //_WM_VISIBLE_NAME } // === WindowName() === -QString LXCB::WindowName(WId win){ //_WM_NAME +QString LXCB::WindowName(WId win){ //_NET_WM_NAME QString out; xcb_get_property_cookie_t cookie = xcb_ewmh_get_wm_name_unchecked(&EWMH, win); if(cookie.sequence == 0){ return out; } @@ -1059,6 +1059,32 @@ QString LXCB::WindowName(WId win){ //_WM_NAME return out; } +// === OldWindowName() === +QString LXCB::OldWindowName(WId win){ //WM_NAME (old standard) + xcb_get_property_cookie_t cookie = xcb_icccm_get_wm_name_unchecked(QX11Info::connection(), win); + xcb_icccm_get_text_property_reply_t reply; + if(1 == xcb_icccm_get_wm_name_reply(QX11Info::connection(), cookie, &reply, NULL) ){ + QString name = QString::fromLocal8Bit(reply.name); + xcb_icccm_get_text_property_reply_wipe(&reply); + return name; + }else{ + return ""; + } +} + +// === OldWindowIconName() === +QString LXCB::OldWindowIconName(WId win){ //WM_ICON_NAME (old standard) + xcb_get_property_cookie_t cookie = xcb_icccm_get_wm_icon_name_unchecked(QX11Info::connection(), win); + xcb_icccm_get_text_property_reply_t reply; + if(1 == xcb_icccm_get_wm_icon_name_reply(QX11Info::connection(), cookie, &reply, NULL) ){ + QString name = QString::fromLocal8Bit(reply.name); + xcb_icccm_get_text_property_reply_wipe(&reply); + return name; + }else{ + return ""; + } +} + // === WindowIsMaximized() === bool LXCB::WindowIsMaximized(WId win){ //See if the _NET_WM_STATE_MAXIMIZED_[VERT/HORZ] flags are set on the window @@ -1348,4 +1374,4 @@ void LXCB::MoveResizeWindow(WId win, QRect geom){ xcb_ewmh_set_workarea(&EWMH, 0, desks, dareas); //_NET_WORKAREA //Make sure to clear that reply xcb_ewmh_get_workarea_reply_wipe(&work); -}*/
\ No newline at end of file +}*/ diff --git a/libLumina/LuminaX11.h b/libLumina/LuminaX11.h index cd5f8183..62146ebe 100644 --- a/libLumina/LuminaX11.h +++ b/libLumina/LuminaX11.h @@ -133,10 +133,12 @@ public: unsigned int WindowWorkspace(WId); //The workspace the window is on QRect WindowGeometry(WId, bool includeFrame = true); //the geometry of the window (frame excluded) WINDOWSTATE WindowState(WId win); //Visible state of window - QString WindowVisibleIconName(WId win); //_WM_VISIBLE_ICON_NAME - QString WindowIconName(WId win); //_WM_ICON_NAME - QString WindowVisibleName(WId win); //_WM_VISIBLE_NAME - QString WindowName(WId win); //_WM_NAME + QString WindowVisibleIconName(WId win); //_NET_WM_VISIBLE_ICON_NAME + QString WindowIconName(WId win); //_NET_WM_ICON_NAME + QString WindowVisibleName(WId win); //_NET_WM_VISIBLE_NAME + QString WindowName(WId win); //_NET_WM_NAME + QString OldWindowName(WId win); //WM_NAME (old standard) + QString OldWindowIconName(WId win); //WM_ICON_NAME (old standard) bool WindowIsMaximized(WId win); QIcon WindowIcon(WId win); //_NET_WM_ICON QPixmap WindowImage(WId win); //Pull the image directly from the window diff --git a/lumina-desktop/LSession.cpp b/lumina-desktop/LSession.cpp index 8eef0b95..6437524b 100644 --- a/lumina-desktop/LSession.cpp +++ b/lumina-desktop/LSession.cpp @@ -257,6 +257,11 @@ void LSession::checkUserFiles(){ }*/ LUtils::LoadSystemDefaults(); } + if(oldversion <= 83){ + //Convert the old->new favorites framework + + } + //Check for the default applications file for lumina-open dset = QDir::homePath()+"/.lumina/LuminaDE/lumina-open.conf"; if(!QFile::exists(dset)){ diff --git a/lumina-desktop/LWinInfo.cpp b/lumina-desktop/LWinInfo.cpp index 4ea91c1f..b1476c4e 100644 --- a/lumina-desktop/LWinInfo.cpp +++ b/lumina-desktop/LWinInfo.cpp @@ -15,9 +15,11 @@ QString LWinInfo::text(){ if(window==0){ return ""; } QString nm = LSession::handle()->XCB->WindowVisibleIconName(window); - if(nm.isEmpty()){ nm = LSession::handle()->XCB->WindowIconName(window); } - if(nm.isEmpty()){ nm = LSession::handle()->XCB->WindowVisibleName(window); } - if(nm.isEmpty()){ nm = LSession::handle()->XCB->WindowName(window); } + if(nm.simplified().isEmpty()){ nm = LSession::handle()->XCB->WindowIconName(window); } + if(nm.simplified().isEmpty()){ nm = LSession::handle()->XCB->WindowVisibleName(window); } + if(nm.simplified().isEmpty()){ nm = LSession::handle()->XCB->WindowName(window); } + if(nm.simplified().isEmpty()){ nm = LSession::handle()->XCB->OldWindowIconName(window); } + if(nm.simplified().isEmpty()){ nm = LSession::handle()->XCB->OldWindowName(window); } return nm; } |