aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2016-08-18 16:18:26 +0200
committerPierre Ossman <ossman@cendio.se>2016-08-18 16:18:26 +0200
commit3fb9479caac55202b3b39d065bb34d4b2bc36b89 (patch)
treee7727d0b255f3ef18a7501ba6fbeff6bacb7b094
parentaf7fb8dad3f5dadce417b58ff28638b55d7f1cb3 (diff)
downloadtigervnc-3fb9479caac55202b3b39d065bb34d4b2bc36b89.tar.gz
tigervnc-3fb9479caac55202b3b39d065bb34d4b2bc36b89.zip
Set cursor sprite globally
Pointer are global, not screen specific. Hence so is also the cursor sprite.
-rw-r--r--unix/xserver/hw/vnc/vncExtInit.cc8
-rw-r--r--unix/xserver/hw/vnc/vncExtInit.h2
-rw-r--r--unix/xserver/hw/vnc/vncHooks.c2
3 files changed, 8 insertions, 4 deletions
diff --git a/unix/xserver/hw/vnc/vncExtInit.cc b/unix/xserver/hw/vnc/vncExtInit.cc
index 36d3742b..dea3cb8b 100644
--- a/unix/xserver/hw/vnc/vncExtInit.cc
+++ b/unix/xserver/hw/vnc/vncExtInit.cc
@@ -394,10 +394,14 @@ void vncAddCopied(int scrIdx, const struct UpdateRect *extents,
desktop[scrIdx]->add_copied(reg, rfb::Point(dx, dy));
}
-void vncSetCursor(int scrIdx, int width, int height, int hotX, int hotY,
+void vncSetCursor(int width, int height, int hotX, int hotY,
const unsigned char *rgbaData)
{
- desktop[scrIdx]->setCursor(width, height, hotX, hotY, rgbaData);
+ for (int scr = 0; scr < vncGetScreenCount(); scr++) {
+ if (desktop[scr] == NULL)
+ continue;
+ desktop[scr]->setCursor(width, height, hotX, hotY, rgbaData);
+ }
}
void vncPreScreenResize(int scrIdx)
diff --git a/unix/xserver/hw/vnc/vncExtInit.h b/unix/xserver/hw/vnc/vncExtInit.h
index a0914ad7..9785d112 100644
--- a/unix/xserver/hw/vnc/vncExtInit.h
+++ b/unix/xserver/hw/vnc/vncExtInit.h
@@ -84,7 +84,7 @@ void vncAddCopied(int scrIdx, const struct UpdateRect *extents,
int nRects, const struct UpdateRect *rects,
int dx, int dy);
-void vncSetCursor(int scrIdx, int width, int height, int hotX, int hotY,
+void vncSetCursor(int width, int height, int hotX, int hotY,
const unsigned char *rgbaData);
void vncPreScreenResize(int scrIdx);
diff --git a/unix/xserver/hw/vnc/vncHooks.c b/unix/xserver/hw/vnc/vncHooks.c
index b21f4c67..22ea9ea8 100644
--- a/unix/xserver/hw/vnc/vncHooks.c
+++ b/unix/xserver/hw/vnc/vncHooks.c
@@ -699,7 +699,7 @@ static Bool vncHooksDisplayCursor(DeviceIntPtr pDev,
}
#endif
- vncSetCursor(pScreen->myNum, width, height, hotX, hotY, rgbaData);
+ vncSetCursor(width, height, hotX, hotY, rgbaData);
free(rgbaData);
}