summaryrefslogtreecommitdiffstats
path: root/krdc
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2013-01-15 03:21:13 +0100
committerSlávek Banko <slavek.banko@axis.cz>2013-01-15 03:33:52 +0100
commit9598af160810ee4dccabad48563ddecd071c6065 (patch)
tree77932ded605d9144460e3e88553df9e1611429a1 /krdc
parent09635a8f7c06d31edf7ca26223f7995c991ba484 (diff)
downloadtdenetwork-9598af160810ee4dccabad48563ddecd071c6065.tar.gz
tdenetwork-9598af160810ee4dccabad48563ddecd071c6065.zip
Fix krdc in view only mode: block key press events, disable clipboard sharing
This resolves Bug 1390
Diffstat (limited to 'krdc')
-rw-r--r--krdc/vnc/kvncview.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/krdc/vnc/kvncview.cpp b/krdc/vnc/kvncview.cpp
index c332afbd..5337e16a 100644
--- a/krdc/vnc/kvncview.cpp
+++ b/krdc/vnc/kvncview.cpp
@@ -338,6 +338,8 @@ TQSize KVncView::framebufferSize() {
void KVncView::setViewOnly(bool s) {
m_viewOnly = s;
+ m_dontSendCb = s;
+
if (s)
setCursor(TQt::ArrowCursor);
else
@@ -610,6 +612,11 @@ void KVncView::wheelEvent(TQWheelEvent *e) {
}
void KVncView::pressKey(XEvent *xe) {
+ if (m_status != REMOTE_VIEW_CONNECTED)
+ return;
+ if (m_viewOnly)
+ return;
+
KKeyNative k(xe);
uint mod = k.mod();
if (mod & KKeyNative::modX(KKey::SHIFT))