aboutsummaryrefslogtreecommitdiff
path: root/libLumina/LuminaX11.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libLumina/LuminaX11.cpp')
-rw-r--r--libLumina/LuminaX11.cpp36
1 files changed, 31 insertions, 5 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
+}*/
bgstack15