mirror of
https://github.com/hyprwm/Hyprland
synced 2026-05-07 07:38:05 +02:00
tests: enforce deterministic pointer behavior (flat accel + fixed sensitivity)
This commit is contained in:
parent
f1a61584cf
commit
eed0713cf8
2 changed files with 6 additions and 6 deletions
|
|
@ -126,14 +126,14 @@ static bool sendScroll(int delta) {
|
|||
}
|
||||
|
||||
TEST_CASE(pointerScroll) {
|
||||
NLog::log("{}Skipping pointerScroll test (CI unstable)", Colors::YELLOW);
|
||||
return;
|
||||
|
||||
std::optional<CClient> client;
|
||||
try {
|
||||
client.emplace();
|
||||
} catch (...) { FAIL_TEST("Couldn't start the client"); }
|
||||
|
||||
// Force deterministic input behavior
|
||||
EXPECT(getFromSocket("r/eval hl.config({ input = { accel_profile = 'flat', sensitivity = 1.0 } })"), "ok");
|
||||
|
||||
EXPECT(getFromSocket("r/eval hl.config({ input = { emulate_discrete_scroll = 0 } })"), "ok");
|
||||
|
||||
EXPECT(sendScroll(10), true);
|
||||
|
|
|
|||
|
|
@ -151,14 +151,14 @@ static bool isCursorPos(int x, int y) {
|
|||
}
|
||||
|
||||
TEST_CASE(pointerWarp) {
|
||||
NLog::log("{}Skipping pointerWarp test (CI unstable)", Colors::YELLOW);
|
||||
return;
|
||||
|
||||
std::optional<CClient> client;
|
||||
try {
|
||||
client.emplace();
|
||||
} catch (...) { FAIL_TEST("Couldn't start the client"); }
|
||||
|
||||
// Force deterministic pointer movement (no accel, fixed sensitivity)
|
||||
EXPECT(getFromSocket("r/eval hl.config({ input = { accel_profile = 'flat', sensitivity = 1.0 } })"), "ok");
|
||||
|
||||
EXPECT(client->sendWarp(100, 100), true);
|
||||
EXPECT(isCursorPos(100, 100), true);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue