mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 22:25:58 +01:00
constraints: don't warp pointer position on release (#8491)
this was annoying for nuklear properties/ui slider elements that grab the pointer via GLFW_CURSOR_DISABLE to allow more range and finer control. upon mouse release, the pointer is reset to the middle of the window without this patch, making long mouse movements necessary to go back to the original position for readjustments. fwiw the new behaviour is consistent with x11 and weston.
This commit is contained in:
parent
2259a88551
commit
6744bb57c6
1 changed files with 1 additions and 1 deletions
|
@ -188,7 +188,7 @@ Vector2D CPointerConstraint::logicPositionHint() {
|
||||||
const auto SURFBOX = pHLSurface->getSurfaceBoxGlobal();
|
const auto SURFBOX = pHLSurface->getSurfaceBoxGlobal();
|
||||||
const auto CONSTRAINTPOS = SURFBOX.has_value() ? SURFBOX->pos() : Vector2D{};
|
const auto CONSTRAINTPOS = SURFBOX.has_value() ? SURFBOX->pos() : Vector2D{};
|
||||||
|
|
||||||
return hintSet ? CONSTRAINTPOS + positionHint : (locked ? CONSTRAINTPOS + SURFBOX->size() / 2.f : cursorPosOnActivate);
|
return hintSet ? CONSTRAINTPOS + positionHint : cursorPosOnActivate;
|
||||||
}
|
}
|
||||||
|
|
||||||
CPointerConstraintsProtocol::CPointerConstraintsProtocol(const wl_interface* iface, const int& ver, const std::string& name) : IWaylandProtocol(iface, ver, name) {
|
CPointerConstraintsProtocol::CPointerConstraintsProtocol(const wl_interface* iface, const int& ver, const std::string& name) : IWaylandProtocol(iface, ver, name) {
|
||||||
|
|
Loading…
Reference in a new issue