mirror of
https://github.com/hyprwm/Hyprland
synced 2025-01-12 12:29:49 +01:00
input-capture: don't send motion when the input is locked (like inside a 3d game)
This commit is contained in:
parent
21a7251d02
commit
0a1f95b657
1 changed files with 3 additions and 1 deletions
|
@ -702,6 +702,8 @@ void CPointerManager::move(const Vector2D& deltaLogical) {
|
||||||
const auto oldPos = pointerPos;
|
const auto oldPos = pointerPos;
|
||||||
auto newPos = oldPos + Vector2D{std::isnan(deltaLogical.x) ? 0.0 : deltaLogical.x, std::isnan(deltaLogical.y) ? 0.0 : deltaLogical.y};
|
auto newPos = oldPos + Vector2D{std::isnan(deltaLogical.x) ? 0.0 : deltaLogical.x, std::isnan(deltaLogical.y) ? 0.0 : deltaLogical.y};
|
||||||
|
|
||||||
|
|
||||||
|
if (!g_pInputManager->isLocked())
|
||||||
PROTO::inputCapture->sendMotion(newPos, deltaLogical);
|
PROTO::inputCapture->sendMotion(newPos, deltaLogical);
|
||||||
|
|
||||||
if (PROTO::inputCapture->isCaptured())
|
if (PROTO::inputCapture->isCaptured())
|
||||||
|
|
Loading…
Reference in a new issue