From 1b9572887078078ba296f9f69f5d9f46ef941a00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Mon, 8 Nov 2021 18:45:34 +0100 Subject: [PATCH] clear CanHost dependency from SendsInactiveCursor. --- internal/webrtc/handler.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/internal/webrtc/handler.go b/internal/webrtc/handler.go index 7ff5f81c..68020977 100644 --- a/internal/webrtc/handler.go +++ b/internal/webrtc/handler.go @@ -42,16 +42,12 @@ func (manager *WebRTCManagerCtx) handle(data []byte, session types.Session) erro } x, y := int(payload.X), int(payload.Y) - - // handle active cursor movement if session.IsHost() { + // handle active cursor movement manager.desktop.Move(x, y) manager.curPosition.Set(x, y) - return nil - } - - // handle inactive cursor movement - if session.Profile().CanHost { + } else { + // handle inactive cursor movement session.SetCursor(types.Cursor{ X: x, Y: y,