Use correct range for pointer position coercion
This commit is contained in:
parent
f0475ccdcf
commit
36d8b66cae
1 changed files with 2 additions and 2 deletions
|
|
@ -262,8 +262,8 @@ class Dispatcher(private val activity: VncActivity) {
|
|||
override fun doMovePointer(p: PointF, dx: Float, dy: Float) {
|
||||
pointerPosition.apply {
|
||||
offset(dx, dy)
|
||||
x = x.coerceIn(0f, viewModel.frameState.fbWidth)
|
||||
y = y.coerceIn(0f, viewModel.frameState.fbHeight)
|
||||
x = x.coerceIn(0f, viewModel.frameState.fbWidth - 1)
|
||||
y = y.coerceIn(0f, viewModel.frameState.fbHeight - 1)
|
||||
}
|
||||
doButtonDown(PointerButton.None, pointerPosition)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue