diff options
author | Ken Moore <moorekou@gmail.com> | 2020-04-06 15:46:17 -0400 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2020-04-06 15:46:17 -0400 |
commit | 682e844ab0ef47a9f50bbca95c86f9e6d28a4f82 (patch) | |
tree | 9b84d44cf3a2be3b96708501a3fd2010d028ab1e /src-qt5/core/lumina-desktop/LWinInfo.cpp | |
parent | Limit lumina-pingcursor to 60 FPS (diff) | |
download | lumina-682e844ab0ef47a9f50bbca95c86f9e6d28a4f82.tar.gz lumina-682e844ab0ef47a9f50bbca95c86f9e6d28a4f82.tar.bz2 lumina-682e844ab0ef47a9f50bbca95c86f9e6d28a4f82.zip |
Fix up the detection of icons for windows.
Add another layer of fallback icon as well
Diffstat (limited to 'src-qt5/core/lumina-desktop/LWinInfo.cpp')
-rw-r--r-- | src-qt5/core/lumina-desktop/LWinInfo.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src-qt5/core/lumina-desktop/LWinInfo.cpp b/src-qt5/core/lumina-desktop/LWinInfo.cpp index 6a6cea0b..6adde234 100644 --- a/src-qt5/core/lumina-desktop/LWinInfo.cpp +++ b/src-qt5/core/lumina-desktop/LWinInfo.cpp @@ -30,15 +30,18 @@ QIcon LWinInfo::icon(bool &noicon){ noicon = false; QIcon ico = LSession::handle()->XCB->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;} + if(ico.isNull()){ + QString cls = this->Class(); + ico = LXDG::findIcon( cls, cls.toLower()); + } + if(ico.isNull()){ico = LXDG::findIcon("window","preferences-system-windows"); noicon=true;} return ico; } - + QString LWinInfo::Class(){ return LSession::handle()->XCB->WindowClass(window); } - + LXCB::WINDOWVISIBILITY LWinInfo::status(bool update){ if(window==0){ return LXCB::IGNORE; } if(update || cstate == LXCB::IGNORE){ |