Internal
Public Access
Add VNC remote cursor shape sync
Implements RFB's Cursor pseudo-encoding (RFC 6143 SS7.8.2, type -239): a FramebufferUpdate rectangle carrying a cursor shape instead of screen content (x/y are the hotspot, not position; width/height are the cursor image size), decoded into an ARGB32 QImage using the rectangle's RGB pixel data plus its opacity bitmask, then never painted into the framebuffer. A 0x0 rectangle means "hide the cursor" per spec. VncDisplayWidget gains RdpDisplayWidget's setCursorImage/Hidden/ Default() + applyCursor() shape, reusing its own renderRect()/ effectiveRemoteSize() so cursor scaling works correctly in both the scale-to-fit and actual-size display modes with no special-casing. VNC never emits cursorReset() (RFB's Cursor pseudo-encoding has no "reset to system default" signal, unlike RDP's SetDefault callback) -- setCursorDefault() exists for symmetry but is unused today. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -274,6 +274,8 @@ SessionTab::SessionTab(const Profile& profile,
|
||||
[this](const QImage& image, const QPoint& hotspot) {
|
||||
if (m_rdpDisplay != nullptr) {
|
||||
m_rdpDisplay->setCursorImage(image, hotspot);
|
||||
} else if (m_vncDisplay != nullptr) {
|
||||
m_vncDisplay->setCursorImage(image, hotspot);
|
||||
}
|
||||
},
|
||||
Qt::QueuedConnection);
|
||||
@@ -283,6 +285,8 @@ SessionTab::SessionTab(const Profile& profile,
|
||||
[this]() {
|
||||
if (m_rdpDisplay != nullptr) {
|
||||
m_rdpDisplay->setCursorHidden();
|
||||
} else if (m_vncDisplay != nullptr) {
|
||||
m_vncDisplay->setCursorHidden();
|
||||
}
|
||||
},
|
||||
Qt::QueuedConnection);
|
||||
@@ -292,6 +296,8 @@ SessionTab::SessionTab(const Profile& profile,
|
||||
[this]() {
|
||||
if (m_rdpDisplay != nullptr) {
|
||||
m_rdpDisplay->setCursorDefault();
|
||||
} else if (m_vncDisplay != nullptr) {
|
||||
m_vncDisplay->setCursorDefault();
|
||||
}
|
||||
},
|
||||
Qt::QueuedConnection);
|
||||
|
||||
Reference in New Issue
Block a user