|
|
@ -338,8 +338,6 @@ 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
|
|
|
@ -513,12 +511,15 @@ void KVncView::customEvent(TQCustomEvent *e)
|
|
|
|
TQApplication::beep();
|
|
|
|
TQApplication::beep();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (e->type() == ServerCutEventType) {
|
|
|
|
else if (e->type() == ServerCutEventType) {
|
|
|
|
ServerCutEvent *sce = (ServerCutEvent*) e;
|
|
|
|
if (!m_viewOnly)
|
|
|
|
TQString ctext = TQString::fromUtf8(sce->bytes(), sce->length());
|
|
|
|
{
|
|
|
|
m_dontSendCb = true;
|
|
|
|
ServerCutEvent *sce = (ServerCutEvent*) e;
|
|
|
|
m_cb->setText(ctext, TQClipboard::Clipboard);
|
|
|
|
TQString ctext = TQString::fromUtf8(sce->bytes(), sce->length());
|
|
|
|
m_cb->setText(ctext, TQClipboard::Selection);
|
|
|
|
m_dontSendCb = true;
|
|
|
|
m_dontSendCb = false;
|
|
|
|
m_cb->setText(ctext, TQClipboard::Clipboard);
|
|
|
|
|
|
|
|
m_cb->setText(ctext, TQClipboard::Selection);
|
|
|
|
|
|
|
|
m_dontSendCb = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (e->type() == MouseStateEventType) {
|
|
|
|
else if (e->type() == MouseStateEventType) {
|
|
|
|
MouseStateEvent *mse = (MouseStateEvent*) e;
|
|
|
|
MouseStateEvent *mse = (MouseStateEvent*) e;
|
|
|
@ -706,6 +707,11 @@ void KVncView::clipboardChanged() {
|
|
|
|
if (m_status != REMOTE_VIEW_CONNECTED)
|
|
|
|
if (m_status != REMOTE_VIEW_CONNECTED)
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (m_viewOnly)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (m_cb->ownsClipboard() || m_dontSendCb)
|
|
|
|
if (m_cb->ownsClipboard() || m_dontSendCb)
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
@ -720,6 +726,11 @@ void KVncView::selectionChanged() {
|
|
|
|
if (m_status != REMOTE_VIEW_CONNECTED)
|
|
|
|
if (m_status != REMOTE_VIEW_CONNECTED)
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (m_viewOnly)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (m_cb->ownsSelection() || m_dontSendCb)
|
|
|
|
if (m_cb->ownsSelection() || m_dontSendCb)
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|