summaryrefslogtreecommitdiff
path: root/hyprtester/src/tests/main/scroll.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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
* 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.
* hyprtester: minor refactoring/restructure (#14154)Nikolai Nechaev2026-04-281-91/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* config/lua: init lua config manager, use lua if available (#13817)Vaxry2026-04-261-34/+34
| | | Adds a new lua config manager, which will automatically be used if there is a lua config present.
* window/rules: add scrolling_width (#13754)ItsOhen2026-03-171-0/+30
|
* algo/scrolling: add config options for focus and swapcol wrapping (#13518)Thedudeman2026-03-051-0/+149
|
* compositor: fix focus edge detection (#13425)Vaxry2026-02-281-0/+79
fixes edge detection, making it more relaxed and intuitive