diff options
-rw-r--r-- | kvmd/apps/vnc/server.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/kvmd/apps/vnc/server.py b/kvmd/apps/vnc/server.py index 697d3172..f4c431a9 100644 --- a/kvmd/apps/vnc/server.py +++ b/kvmd/apps/vnc/server.py @@ -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 |