diff options
author | Ken Moore <ken@pcbsd.org> | 2014-12-30 08:45:07 -0500 |
---|---|---|
committer | Ken Moore <ken@pcbsd.org> | 2014-12-30 08:45:07 -0500 |
commit | 18d797031bdff03967d38d1f8b2ca847b3362af5 (patch) | |
tree | b265f8adc6291f868292ca80975f0794a0734c96 /lumina-desktop/LWinInfo.h | |
parent | Add a quick check to the FreeBSD screen brightness functions for not allowing... (diff) | |
download | lumina-18d797031bdff03967d38d1f8b2ca847b3362af5.tar.gz lumina-18d797031bdff03967d38d1f8b2ca847b3362af5.tar.bz2 lumina-18d797031bdff03967d38d1f8b2ca847b3362af5.zip |
Commit some more XLib->XCB conversions (everything for the task manager), and fix a stray seg fault in the XCB window class detection routine.
Diffstat (limited to 'lumina-desktop/LWinInfo.h')
-rw-r--r-- | lumina-desktop/LWinInfo.h | 47 |
1 files changed, 4 insertions, 43 deletions
diff --git a/lumina-desktop/LWinInfo.h b/lumina-desktop/LWinInfo.h index ae67499b..8fb70ee2 100644 --- a/lumina-desktop/LWinInfo.h +++ b/lumina-desktop/LWinInfo.h @@ -39,49 +39,10 @@ public: //Information Retrieval // Don't cache these results because they can change regularly - QString text(){ - if(window==0){ return ""; } - QString nm = LX11::WindowVisibleIconName(window); - if(nm.isEmpty()){ nm = LX11::WindowIconName(window); } - if(nm.isEmpty()){ nm = LX11::WindowVisibleName(window); } - if(nm.isEmpty()){ nm = LX11::WindowName(window); } - return nm; - } - - QIcon icon(bool &noicon){ - if(window==0){ noicon = true; return QIcon();} - //qDebug() << "Check for Window Icon:" << window; - noicon = false; - QIcon ico = LX11::WindowIcon(window); - //Check for a null icon, and supply one if necessary - if(ico.isNull()){ ico = LXDG::findIcon( this->Class().toLower(),""); } - if(ico.isNull()){ ico = LXDG::findIcon("preferences-system-windows",""); noicon=true;} - return ico; - } - - QString Class(){ - return LX11::WindowClass(window); - } - - Lumina::STATES status(){ - if(window==0){ return Lumina::NOSHOW; } - LX11::WINDOWSTATE ws = LX11::GetWindowState(window); - Lumina::STATES state; - switch(ws){ - case LX11::VISIBLE: - state = Lumina::VISIBLE; break; - case LX11::INVISIBLE: - state = Lumina::INVISIBLE; break; - case LX11::ACTIVE: - state = Lumina::ACTIVE; break; - case LX11::ATTENTION: - state = Lumina::NOTIFICATION; break; - default: - state = Lumina::NOSHOW; - } - //qDebug() << "Window State:" << ws << state; - return state; - } + QString text(); + QIcon icon(bool &noicon); + QString Class(); + Lumina::STATES status(); }; #endif
\ No newline at end of file |