aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-11-10 10:32:59 +0100
committerDanilo M. <danix@danix.xyz>2026-11-10 10:32:59 +0100
commitfa71508066128124feb1b1110ca8e8f65e831508 (patch)
tree43b8c0191d9776f6009d2986e5f657b46fb59584 /tests
parent819745a39220b49e848422b4bf0ee71dc317fc4d (diff)
downloaddeck-it-fa71508066128124feb1b1110ca8e8f65e831508.tar.gz
deck-it-fa71508066128124feb1b1110ca8e8f65e831508.zip
fix: window list flicker and icons missing from the icon theme
The Windows tab rebuilt every row once a second, and each rebuild walked every window icon through its fallback names again, so the rows blinked. It now re-renders only when the state changed. Icon lookup only searched the configured theme, so an app the theme lacks (pcmanfm-qt under candy-icons) lost its icon and showed its label. It now falls back to hicolor, as the icon theme spec does, in hicolor's size/category layout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/test_server.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_server.py b/tests/test_server.py
index a8fdf0d..7f2ee1c 100644
--- a/tests/test_server.py
+++ b/tests/test_server.py
@@ -128,6 +128,16 @@ class Server(unittest.TestCase):
self.assertIsNone(srv.icon_path("../x", "candy-icons", [base]))
self.assertIsNone(srv.icon_path("nope", "candy-icons", [base]))
+ def test_icon_path_falls_back_to_hicolor(self):
+ import tempfile
+ from pathlib import Path
+ base = Path(tempfile.mkdtemp())
+ (base / "candy-icons" / "apps" / "scalable").mkdir(parents=True)
+ d = base / "hicolor" / "scalable" / "apps"
+ d.mkdir(parents=True)
+ (d / "pcmanfm-qt.svg").write_text("<svg/>")
+ self.assertEqual(srv.icon_path("pcmanfm-qt", "candy-icons", [base]), d / "pcmanfm-qt.svg")
+
def test_art_route(self):
from unittest import mock
with mock.patch.object(srv, "art", return_value=(b"PNGDATA", "image/png")):