mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2025-12-12 01:00:29 +08:00
Fixed pikvm/pikvm#925: The mouse click should be processed after the movement
This commit is contained in:
parent
f652eca9c2
commit
dd702116b7
@ -370,11 +370,6 @@ class _Client(RfbClient): # pylint: disable=too-many-instance-attributes
|
||||
|
||||
async def _on_pointer_event(self, buttons: dict[str, bool], wheel: dict[str, int], move: dict[str, int]) -> None:
|
||||
if self.__kvmd_ws:
|
||||
for (button, state) in buttons.items():
|
||||
if self.__mouse_buttons[button] != state:
|
||||
await self.__kvmd_ws.send_mouse_button_event(button, state)
|
||||
self.__mouse_buttons[button] = state
|
||||
|
||||
if wheel["x"] or wheel["y"]:
|
||||
await self.__kvmd_ws.send_mouse_wheel_event(wheel["x"], wheel["y"])
|
||||
|
||||
@ -382,6 +377,11 @@ class _Client(RfbClient): # pylint: disable=too-many-instance-attributes
|
||||
await self.__kvmd_ws.send_mouse_move_event(move["x"], move["y"])
|
||||
self.__mouse_move = move
|
||||
|
||||
for (button, state) in buttons.items():
|
||||
if self.__mouse_buttons[button] != state:
|
||||
await self.__kvmd_ws.send_mouse_button_event(button, state)
|
||||
self.__mouse_buttons[button] = state
|
||||
|
||||
async def _on_cut_event(self, text: str) -> None:
|
||||
assert self.__stage1_authorized.is_passed()
|
||||
assert self.__kvmd_session
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user