summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorJeremy Katz <jeremy.katz@nokia.com>2009-11-11 13:08:41 (GMT)
committerJeremy Katz <jeremy.katz@nokia.com>2009-11-11 13:08:41 (GMT)
commitf50552ccfbe9a71d798d00a2d963898c98654256 (patch)
tree6e8bd53619d0785f30c35c9384bbdda37b4b665f /src/plugins
parentfc0c5aa573d834041b9ea164fc4b19eda7e66ab7 (diff)
downloadQt-f50552ccfbe9a71d798d00a2d963898c98654256.zip
Qt-f50552ccfbe9a71d798d00a2d963898c98654256.tar.gz
Qt-f50552ccfbe9a71d798d00a2d963898c98654256.tar.bz2
send client cursor via QVNCServer checkUpdate(), rather than asynchronously
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/graphicssystems/vnc/qvnccursor.cpp12
-rw-r--r--src/plugins/graphicssystems/vnc/qvncserver.cpp1
2 files changed, 9 insertions, 4 deletions
diff --git a/src/plugins/graphicssystems/vnc/qvnccursor.cpp b/src/plugins/graphicssystems/vnc/qvnccursor.cpp
index ec9a4ee..80ab750 100644
--- a/src/plugins/graphicssystems/vnc/qvnccursor.cpp
+++ b/src/plugins/graphicssystems/vnc/qvnccursor.cpp
@@ -65,9 +65,9 @@ void QVNCCursor::setCursorMode(bool vnc)
if (vnc) {
screen->setDirty(prevRect);
prevRect = QRect();
- sendClientCursor();
+ server->setDirtyCursor();
} else {
- clearClientCursor();
+ server->setDirtyCursor();
}
useVncCursor = vnc;
}
@@ -76,7 +76,7 @@ void QVNCCursor::setCursor(Qt::CursorShape shape)
{
QGraphicsSystemCursor::setCursor(shape);
if (useVncCursor) {
- sendClientCursor();
+ server->setDirtyCursor();
}
}
@@ -84,7 +84,7 @@ void QVNCCursor::setCursor(const uchar *data, const uchar *mask, int width, int
{
QGraphicsSystemCursor::setCursor(data, mask, width, height, hotX, hotY);
if (useVncCursor) {
- sendClientCursor();
+ server->setDirtyCursor();
}
}
@@ -121,6 +121,10 @@ void QVNCCursor::clearClientCursor()
void QVNCCursor::sendClientCursor()
{
+ if (useVncCursor == false) {
+ clearClientCursor();
+ return;
+ }
QImage *image = graphic->image();
if (image->isNull())
return;
diff --git a/src/plugins/graphicssystems/vnc/qvncserver.cpp b/src/plugins/graphicssystems/vnc/qvncserver.cpp
index fd66f47..ef6b4a1 100644
--- a/src/plugins/graphicssystems/vnc/qvncserver.cpp
+++ b/src/plugins/graphicssystems/vnc/qvncserver.cpp
@@ -1840,6 +1840,7 @@ void QVNCServer::checkUpdate()
Q_ASSERT(qvnc_cursor);
qvnc_cursor->write();
#endif
+ cursor->sendClientCursor();
dirtyCursor = false;
wantUpdate = false;
return;