Fix krdc in view only mode: block key press events, disable clipboard sharing

This resolves Bug 1390
pull/1/head
Slávek Banko 12 years ago
parent 09635a8f7c
commit 9598af1608

@ -338,6 +338,8 @@ TQSize KVncView::framebufferSize() {
void KVncView::setViewOnly(bool s) { void KVncView::setViewOnly(bool s) {
m_viewOnly = s; m_viewOnly = s;
m_dontSendCb = s;
if (s) if (s)
setCursor(TQt::ArrowCursor); setCursor(TQt::ArrowCursor);
else else
@ -610,6 +612,11 @@ void KVncView::wheelEvent(TQWheelEvent *e) {
} }
void KVncView::pressKey(XEvent *xe) { void KVncView::pressKey(XEvent *xe) {
if (m_status != REMOTE_VIEW_CONNECTED)
return;
if (m_viewOnly)
return;
KKeyNative k(xe); KKeyNative k(xe);
uint mod = k.mod(); uint mod = k.mod();
if (mod & KKeyNative::modX(KKey::SHIFT)) if (mod & KKeyNative::modX(KKey::SHIFT))

Loading…
Cancel
Save