[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdenetwork/krfb/krfb
From: George Kiagiadakis <kiagiadakis.george () gmail ! com>
Date: 2010-11-10 18:56:59
Message-ID: 20101110185659.A87FEAC8AA () svn ! kde ! org
[Download RAW message or body]
SVN commit 1195282 by gkiagia:
Fix remote cursor not working. BUG: 207706
M +35 -0 rfbservermanager.cpp
--- trunk/KDE/kdenetwork/krfb/krfb/rfbservermanager.cpp #1195281:1195282
@@ -75,6 +75,36 @@
" xxxxx "
" xxx ";
+/* copied from vino's bundled libvncserver...
+ * Copyright (C) 2000, 2001 Const Kaplinsky. All Rights Reserved.
+ * Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved.
+ */
+static void krfb_rfbSetCursorPosition(rfbScreenInfoPtr screen, rfbClientPtr client, int x, int y)
+{
+ rfbClientIteratorPtr iterator;
+ rfbClientPtr cl;
+
+ if (x == screen->cursorX || y == screen->cursorY)
+ return;
+
+ LOCK(screen->cursorMutex);
+ screen->cursorX = x;
+ screen->cursorY = y;
+ UNLOCK(screen->cursorMutex);
+
+ /* Inform all clients about this cursor movement. */
+ iterator = rfbGetClientIterator(screen);
+ while ((cl = rfbClientIteratorNext(iterator)) != NULL) {
+ cl->cursorWasMoved = TRUE;
+ }
+ rfbReleaseClientIterator(iterator);
+
+ /* The cursor was moved by this client, so don't send CursorPos. */
+ if (client) {
+ client->cursorWasMoved = FALSE;
+ }
+}
+
struct RfbClientData
{
RfbClientData(RfbClient *c, RfbServer *s)
@@ -181,6 +211,10 @@
it.next();
rfbScreenInfoPtr screen = it.value();
+ //update the cursor position
+ QPoint currentCursorPos = QCursor::pos();
+ krfb_rfbSetCursorPosition(screen, NULL, currentCursorPos.x(), currentCursorPos.y());
+
foreach(const QRect & r, d->fb->modifiedTiles()) {
rfbMarkRectAsModified(screen, r.x(), r.y(), r.right(), r.bottom());
}
@@ -200,6 +234,7 @@
rfbScreenCleanup(screen);
}
+ d->myCursor->cleanup = true;
rfbFreeCursor(d->myCursor);
d->fb.clear();
d->rfbProcessEventTimer.stop();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic