summaryrefslogtreecommitdiff
path: root/hyprtester/src/tests
Commit message (Collapse)AuthorAgeFilesLines
* compositor: recalculate workspace state after fs state update (#14369)mainVaxry2026-05-081-1/+50
|
* keybind/actions: `cycle_next` w/ `tiled = true` doesn't choose only tiled ↵erstarr2026-05-081-0/+72
| | | | | | | | | windows (#14164) * fix tiling only selection: actually select only tiling when chosen * clang-format * test: cycle_next float only and tiled only
* algo/scrolling: various scrolling view related bugfixes (#13974)erstarr2026-05-081-1/+739
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fix scrolling view move when a grouped window is closed - prevent redundant space assignment for a grouped window that's about to be unmapped, add a `FOCUS_REASON` for unmapping grouped windows * fix focus_fallback after unmapping a window floating moving view * fix view change when changing workspaces (special and normal). add an optional `RECALCULATE_REASON` parameter to `recalculate()` calls of all algorithms. add an optional `RECALCULATE_MONITOR_REASON` parameter to `recalculateMonitor()` calls. add 2 new `FOCUS_REASON`s, for workspace change and special workspace toggle * Fix hyprctl keyword causing scrolling view move. rename INPUT_MODE_KB to INPUT_MODE_HARD since it seems to have little to do with keybinds * fix fullscreen/maximise moving the scrolling view * fix opening of layer 3 programs moving scrolling view * refactor, clean up and clang-format * fix bad decisions * fix includes, clang-format. * remove TODO * `focuswindow` no longer moves scrolling view when `follow_focus = 0` * fix: changes in a group's current window no longer casues scrolling view shift when `follow_focus = 0` * fix: `moveintogroup`, `movewindoworgroup` no longer causes scrolling view change if `follow_focus = 0` * clang-format * add `RECALCULATE_REASON_UNKNOWN`, `RECALCULATE_MONITOR_REASON_UNKNOWN`, `REMOVE_FROM_GROUP_REASON_UNKNOWN` remove optional wrapper from their enums, refactor code to work with the change * dispatches that call `switchtoWindow()` in CKeybindManager no longer cause scrolling view to move if `follow_focus = 0`. They still cause the move if `follow_focus = 1` Dispatches effected by this: `movefocus`, `cyclenext`, `focuscurrentorlast`, `focuscurrentorurgent` * Fix for Lua: switchToWondow * Fix for Lua: focus({window}) * Fix for Lua: Move Window Into Group * clang-format * Drop `hyprctl keyword` change * test: `focus({window})` with `follow_focus = false` * test: `focus({window})` with `follow_focus = true` * test: test Focus Fallback * test: Focus Fallback with groups * test: workspace change * test: special workspace toggle * test: workspace change - special to special also minor refactoring * test: close window in a group * test: move window into group `follow_focus = false` minor fix in test: expect -> assert * test: move window into group `follow_focus = true` * test: new layer * test: maximise fix in test: expect to assert. * test: fullscreen * test: `dispatch window.focus({ direction })` when `follow_focus = false` * test: `dispatch window.focus({ direction })` when `follow_focus = true` test-fix: expect -> assert * test: move focus within group when `follow_focus = false` * test: move focus within group when `follow_focus = true` * test-fix: kill all layers before killing all windows in layers test. prevents internal post test cleanup function failing to kill all layers test-fix: maximized and fullscreen swapped between their tests test-fix: testScrollingViewBehaviourMoveFocusInGroupFollowFocusTrue missing layout initialization test-fix: testScrollingViewBehaviourWorkspaceChange, testScrollingViewBehaviourCloseWindowInGroup have stale window class in a comment clang-format * catch up with main: move to new test function * clean-up the clean-up part of the tests: redundant * clang-format * pain * suffering: fix rebase fail * test: manually kill all layers since the cleanup function fails * remove test: fullscreen and maximise. scrolling has its own behaviour now
* desktop/workspace: fix visibility criteria matching (#14349)Vaxry2026-05-081-0/+40
| | | ref https://github.com/hyprwm/Hyprland/discussions/14233
* layout/scrolling: fix edge detection in recalculate() (#14359)Vaxry2026-05-081-0/+1
| | | ref #14339
* layout/scrolling: handle fullscreen manually (#14190)Vaxry2026-05-071-2/+44
| | | Makes scroll handle fullscreen by itself, allowing for fs scrolls.
* config/lua: add simple layout API (#14258)Vaxry2026-05-061-0/+56
| | | Adds a simple layout lua api
* groups: add groupbar middle_click_close option (#14242)Maxim Andreev2026-05-051-0/+39
|
* config: add device tags (#13728)ArchSav2026-05-051-0/+8
| | | | | --------- Co-authored-by: Mio Argillander <mio@argillander.me>
* tests: skip pointer tests in CI due to missing input environment (#14238)Visal Vijay2026-05-032-1/+6
| | | | | | | | | | | | | | | * tests: skip pointer tests when pointer input is non-functional * tests: skip pointer tests in CI due to unreliable cursor behavior * tests: skip pointer tests when no reliable input environment is available * tests: skip pointer tests when pointer behavior is unreliable * tests: temporarily disable pointer tests due to unstable CI environment * tests: enforce deterministic pointer behavior (flat accel + fixed sensitivity) * tests: temporarily disable pointer tests due to unstable CI environment
* layout/master: fix rollprev/rollnext focusing the wrong window (#14209)Kyler Clay2026-05-021-0/+69
| | | | | * layout/master: fix rollprev/rollnext focusing the wrong window * tests/master: add tests for rollnext/rollprev focus
* gestures: add live pinch cursor zoom (#14049)Barrett Ruth2026-05-022-0/+40
|
* monitor: fix centered floating windows off-screen in special workspace (#14203)Zebra27112026-04-301-0/+22
| | | Signed-off-by: Zebra2711 <zebra2711t@gmail.com>
* tests: Fix more tests failing on CI (#14159)Nikolai Nechaev2026-04-297-25/+45
| | | | | | | | | | | | | | | | | | | | | * tests: Relax color management requirements in the colors test This continues the work from d4dd299 (#14142): - Fixes a missed check assuming a fixed value for `colorManagementPreset` - Stricten checks to require that the expected keywords are present as json keys * tests: Refactor `Tests::getAttribute` (was `Tests::getWindowAttribute`) - Improve ergonomics by consistently handling attribute name; - Remove 'window' from the function name, since it is compatible with other responses too; - Document the function. * tests: Fix solitary test assuming it knows the complete set of blockers The test was failing on the CI because new blockers appeared, which were not expected by the text. Fix the test, so that it just checks the set of expected blockers is a subset of actual blockers
* config/lua: fix unbind behavior (#14199)Vaxry2026-04-292-23/+38
|
* config/lua: add ExpressionVec2, allow using a table for vec2 rules (#14197)Vaxry2026-04-281-2/+3
|
* hyprtester: minor refactoring/restructure (#14154)Nikolai Nechaev2026-04-2828-1464/+787
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * hyprtester: Minor misc fixes - Use `std::filesystem::path` instead of `std::string` in some places; - Use `std::ranges::sort`, as suggested by clang-tidy; - Reset colors at the end of every log line; - Give more specific error messages in main. * hyprtester: Fix a bug in `hyprlandAlive()` Successful standard library calls are permitted to (and do) modify the value of `errno` arbitrarily. Checking the value of `errno` only makes sense when the library function returns an error. So, the correct condition of a successful signal delivery is that the call to `kill` returns 0. Btw, given the possible other error values of `kill(2)`, should we even consider `errno` at all? * hyprtester: Restructure main Split main's `main()` into multiple functions, separate responsibilities more cleanly. Add default values for cmd-line options to the help message. * hyprtester: Remove redundant path canonicalization * hyprtester: Run unified clean up code before every test * tests: Use RAII for clients in client tests Turn clients in client tests into classes. Constructors initialize, destructors deinitialize. Not only is it better design when entities (clients) are modeled as classes, keeping all the methods connected, this also ensures the tests perform their custom cleanup. This will be especially important when we introduce early termination on failure into the tests. * hyprtester: Rewrite the testing framework! - Implement a new test definition system used via the `TEST_CASE` and `SUBTEST` macros. - Adds `ASSERT*` and reimplements `EXPECT*` macros. The former now terminate the test immediately. Also add some new macros, such as `FAIL_TEST`. - Move existing tests to the new system. For trivial cases, break existing test functions down to multiple test cases. - For non-trivial cases and a few other possible improvements, leave TODOs. * tests: Use `EXPECT*` instead of `ASSERT*` in some places `ASSERT*` macros terminate the test as soon as they fail. They are appropriate to use when, if something fails, the rest of the test does not make sense and more error messages from failing checks will just pollute the output. `EXPECT*` macros mark the test as failed but its execution continues. It makes sense to use them when error messages from the following checks in the test may be useful for someone who will be reading the log. I changed some uses of `ASSERT*` in main tests to `EXPECT*`. But I was not reading tests very carefully, so maybe I was wrong in some places. My rule of thumb was: - Checks that ensure that a kitty opens / a certain set/number of windows exists are fatal; - A series of checks, especially on the same string returned by `Hyprland`, are non-fatal; - Checks in tests with tightly coupled steps (i.e., do this, check, do this with the result of the previous step, check, etc) are fatal.
* tests: tolerate plugin config mismatch in CI (#14173)Visal Vijay2026-04-272-4/+4
|
* config/lua: init lua config manager, use lua if available (#13817)Vaxry2026-04-2626-760/+774
| | | Adds a new lua config manager, which will automatically be used if there is a lua config present.
* tests: stabilize CI by relaxing env-dependent checks and timing-sensitive ↵Visal Vijay2026-04-223-6/+16
| | | | | | | | | | | assertions (#14142) * tests: relax initial colorManagementPreset expectation * tests: relax hardcoded dwindle position expectation * tests: stabilize keybind timing and relax env-dependent color checks * fix cf
* input: implement follow_mouse_shrink (#13707)Mihail Costea2026-04-201-0/+131
| | | | | | | | | | | | | | | | | * input: implement follow_mouse_shrink Add a new config option `input:follow_mouse_shrink` (INT, 0-300, default 0) that shrinks inactive window hitboxes by the specified number of pixels for focus detection purposes. This creates a dead zone in gaps between windows where moving the cursor will not trigger a focus change. The shrink only applies to inactive (non-focused) windows and only during mouse-move focus checks (follow_mouse = 1). Click and scroll interactions are unaffected — clicking on a window in the shrunk area still works normally once the window is focused. Closes #9973 * tests: add integration test for follow_mouse_shrink
* groups: fix `movewindoworgroup` when moving from group to group (#14086)Nikolai Nechaev2026-04-161-0/+59
| | | | | | | | | | | | | * Add test for movewindowgroup * groups: Fix `movewindoworgroup` moving into group Fixes `CKeybindManager::moveWindowIntoGroup` to remove a window from a group before attempting to add it to another group. Addresses #13843. But the animation of moving a window from a group into another group now looks weird: as if the whole target group is being moved.
* keybinds: fix wrong space assignment in pin (#14061)Vaxry2026-04-121-0/+19
|
* layout/algo: preserve focused target if applicable on layout switches (#14058)Vaxry2026-04-121-0/+26
| | | fixes #13804
* dispatchers: add moveintoorcreategroup (#13325)littleblack1112026-03-281-0/+111
|
* input: allow focus to switch to most recently used window on closed (#13769)Chris Naporlee2026-03-281-0/+38
|
* desktop/workspaceHistory: small refactor to work better with multi monitor ↵Mr-Stoneman2026-03-261-0/+30
| | | | setups (#13632)
* hyprctl: fix json output for the submap command (#13726)John Berg2026-03-221-0/+8
| | | | | | | | | | | | | | | The output of ``hyprctl submap -j`` returns a string contained within curly braces e.g. ``{"default"}``. But this is not valid JSON as-per RFC-7159, as an object must be a set of name/value pairs. As a result, tools such as jq do not accept the current output. This patch is a simple fix is to drop the braces and return the string describing the current submap. The new JSON formatting is accepted by jq. This would be a breaking change for anything which consumes the current output of the submap command, but since parsers reject this (and since the output is pretty simple to parse without using the -j flag) impact might be more limited. Signed-off-by: John Berg <john.berg.96bits@gmail.com>
* config: cleanup the entire config infrastructure (#13785)Vaxry2026-03-202-56/+66
| | | | Massively refactors the config infrastructure, sorely needed and will be req'd for the lua stuff
* window/rules: add scrolling_width (#13754)ItsOhen2026-03-171-0/+30
|
* view: consolidate group flags and apply window rules (#13694)Kon2026-03-171-0/+83
| | | | | | | | | * view: consolidate group flags and apply window rules Replace individual boolean flags with a bitmask for group policies and ensure that window-specific group rules are correctly inherited when windows are initialized or added to a group. * tests: add cases for locked groups and invade rule Add tests to verify window grouping behavior, specifically checking that locked groups prevent merging by default and that the 'invade' group rule correctly overrides this lock policy.
* desktop/rules: fix static rules and content type. (#13725)ItsOhen2026-03-151-15/+20
| | | | Hopefully for the last time in a while. Also a lot easier to add in new static types with the recheck done in window map instead of the rule.
* input: add device specific binds (#13073)ArchSav2026-03-131-0/+29
| | | Adds support for device-specific binds
* compositor: When processing fullscreen states, only use effective mode where ↵Nikolai Nechaev2026-03-101-0/+32
| | | | | | | | | necessary (#13607) Simplify the compositor fullscreen state processing: use the complete fullscreen mode value except when the effective fullscreen mode value is needed. Fixes #13041.
* algo/dwindle: Respect `force_split` when moving windows to workspaces (#13038)Nikolai Nechaev2026-03-104-17/+42
| | | | | | Respect `dwindle:force_split` not only when mapping new windows, but also when moving windows to workspaces. Fixes #13009.
* algo/dwindle: do NOT use smart_split for overridden focal point (#13635)Vaxry2026-03-091-4/+4
| | | ref #13594
* desktop/windowRule: fix matching CONTENT (#13636)Vaxry2026-03-071-0/+28
| | | ref #13596
* dwindle: add rotatesplit layoutmsg and tests (#13235)Mikhail2026-03-061-0/+95
|
* layerrules: add dynamically registered rules for plugins (#13331)Virt2026-03-064-4/+137
| | | | | | | | | * layerrules: add dynamically registered rules for plugins * be gone * layerrules: add layer tests with waybar * fix: use kitty layers instead of waybar
* desktop/rules: fix empty workspace handling (#13544)justin40462026-03-051-0/+46
|
* algo/scrolling: add config options for focus and swapcol wrapping (#13518)Thedudeman2026-03-051-0/+149
|
* desktop/window: fix floating windows being auto-grouped (#13475)André Silva2026-03-032-0/+67
| | | | | --------- Co-authored-by: Aqa-Ib <16420574+Aqa-Ib@users.noreply.github.com>
* hyprctl: fix workspace dynamic effect reloading (#13537)Vaxry2026-03-031-1/+19
| | | ref https://github.com/hyprwm/Hyprland/discussions/12806
* layout/windowTarget: override maximized box status in updateGeom (#13535)Vaxry2026-03-031-0/+64
| | | | ref https://github.com/hyprwm/Hyprland/discussions/13525
* algo/dwindle: don't crash on empty swapsplit (#13533)Vaxry2026-03-031-8/+7
| | | ref https://github.com/hyprwm/Hyprland/discussions/13530
* tests/workspace: fix one test case failingVaxry2026-03-031-1/+1
|
* layout/algos: use binds:window_direction_monitor_fallback for moves (#13508)Vaxry2026-03-021-0/+121
| | | ref https://github.com/hyprwm/Hyprland/discussions/13473
* desktop/group: respect direction when moving window out of group (#13490)André Silva2026-03-022-4/+57
|
* layout: store and preserve size and pos after fullscreen (#13500)Vaxry2026-03-021-0/+49
| | | ref https://github.com/hyprwm/Hyprland/discussions/13401
* layout/windowTarget: don't use swar on maximized (#13501)Vaxry2026-03-021-0/+9
|