Allow Cursor pseudo-encoding in session mode and cache last XFixes sprite

This commit is contained in:
Viktor Liu
2026-05-20 17:39:07 +02:00
parent f37e228cc2
commit b41d11bbbe
3 changed files with 27 additions and 22 deletions
-7
View File
@@ -99,10 +99,6 @@ type session struct {
// source so the encoder stops polling for the rest of the session.
// Reset on SetEncodings so a reconnect can retry.
cursorSourceFailed bool
// disableCursor suppresses the Cursor pseudo-encoding regardless of
// what the client advertises. Set for virtual sessions where no
// usable cursor source exists. Constant for the session lifetime.
disableCursor bool
// showRemoteCursor switches the encoder to compositing the server
// cursor sprite into the captured framebuffer at the remote position
// instead of emitting the Cursor pseudo-encoding. Toggled by the
@@ -462,9 +458,6 @@ func (s *session) applyEncoding(enc int32) string {
s.clientSupportsExtClipboard = true
return "ext-clipboard"
case pseudoEncCursor:
if s.disableCursor {
return ""
}
s.clientSupportsCursor = true
return "cursor"
case pseudoEncExtendedMouseButtons: