aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-11-09 20:47:12 +0100
committerDanilo M. <danix@danix.xyz>2026-11-09 20:47:12 +0100
commitae94e849a03122d8a4a2356e375cec9804b3e91a (patch)
treeff2e6be69170cc27aed916c35696dec8b3099d27 /tests
parent6465ffceeef5c3df404972bf4eaa1b24e451a7c4 (diff)
downloaddeck-it-ae94e849a03122d8a4a2356e375cec9804b3e91a.tar.gz
deck-it-ae94e849a03122d8a4a2356e375cec9804b3e91a.zip
fix: window focus and close must call hl.dispatch
Diffstat (limited to 'tests')
-rw-r--r--tests/test_windows.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test_windows.py b/tests/test_windows.py
index 8e27d26..f8e4c3d 100644
--- a/tests/test_windows.py
+++ b/tests/test_windows.py
@@ -44,6 +44,12 @@ class Commands(unittest.TestCase):
["hyprctl", "dispatch", "workspace", "3"])
self.assertEqual(windows.workspace_cmd(3, lua=True)[:2], ["hyprctl", "eval"])
+ def test_window_commands_are_dispatched(self):
+ self.assertEqual(windows.window_cmd("focus", "0x1", lua=True),
+ ["hyprctl", "eval", 'hl.dispatch(hl.dsp.focus({window = "address:0x1"}))'])
+ self.assertEqual(windows.window_cmd("close", "0x1", lua=True),
+ ["hyprctl", "eval", 'hl.dispatch(hl.dsp.window.close({window = "address:0x1"}))'])
+
def test_address_guard(self):
self.assertIsNone(windows.ADDR.fullmatch("0x1;rm"))
self.assertTrue(windows.ADDR.fullmatch("0x55897e5c0800"))