mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-04 20:25:59 +01:00
seat: fix double scrolling in some applications (#8583)
This commit is contained in:
parent
2687788236
commit
1fb720b62a
3 changed files with 9 additions and 2 deletions
|
@ -332,8 +332,10 @@ void CSeatManager::sendPointerAxis(uint32_t timeMs, wl_pointer_axis axis, double
|
||||||
p->sendAxisRelativeDirection(axis, relative);
|
p->sendAxisRelativeDirection(axis, relative);
|
||||||
|
|
||||||
if (source == 0) {
|
if (source == 0) {
|
||||||
p->sendAxisValue120(axis, value120);
|
if (p->version() >= 8)
|
||||||
p->sendAxisDiscrete(axis, discrete);
|
p->sendAxisValue120(axis, value120);
|
||||||
|
else
|
||||||
|
p->sendAxisDiscrete(axis, discrete);
|
||||||
} else if (value == 0)
|
} else if (value == 0)
|
||||||
p->sendAxisStop(timeMs, axis);
|
p->sendAxisStop(timeMs, axis);
|
||||||
}
|
}
|
||||||
|
|
|
@ -136,6 +136,10 @@ CWLPointerResource::CWLPointerResource(SP<CWlPointer> resource_, SP<CWLSeatResou
|
||||||
sendEnter(g_pSeatManager->state.pointerFocus.lock(), {-1, -1} /* Coords don't really matter that much, they will be updated next move */);
|
sendEnter(g_pSeatManager->state.pointerFocus.lock(), {-1, -1} /* Coords don't really matter that much, they will be updated next move */);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int CWLPointerResource::version() {
|
||||||
|
return resource->version();
|
||||||
|
}
|
||||||
|
|
||||||
bool CWLPointerResource::good() {
|
bool CWLPointerResource::good() {
|
||||||
return resource->resource();
|
return resource->resource();
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,6 +73,7 @@ class CWLPointerResource {
|
||||||
CWLPointerResource(SP<CWlPointer> resource_, SP<CWLSeatResource> owner_);
|
CWLPointerResource(SP<CWlPointer> resource_, SP<CWLSeatResource> owner_);
|
||||||
|
|
||||||
bool good();
|
bool good();
|
||||||
|
int version();
|
||||||
void sendEnter(SP<CWLSurfaceResource> surface, const Vector2D& local);
|
void sendEnter(SP<CWLSurfaceResource> surface, const Vector2D& local);
|
||||||
void sendLeave();
|
void sendLeave();
|
||||||
void sendMotion(uint32_t timeMs, const Vector2D& local);
|
void sendMotion(uint32_t timeMs, const Vector2D& local);
|
||||||
|
|
Loading…
Reference in a new issue