From 5623064e533bd3340211ebd355d92e96d1a8abd6 Mon Sep 17 00:00:00 2001 From: christian Date: Wed, 15 Sep 2010 22:34:25 +0200 Subject: [PATCH] fix symbol key --- debian/changelog | 1 + src/mainwindow.cpp | 4 ++++ src/vncview.cpp | 10 ++++++++++ 3 files changed, 15 insertions(+) diff --git a/debian/changelog b/debian/changelog index 7585e84..92af072 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ presencevnc (0.5) unstable; urgency=low * Add "..." menu for additional keys + * Symbol key (Fn+Ctrl) fixed -- Christian Pulvermacher Fri, 27 Aug 2010 19:09:29 +0200 diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 7f8e832..385e1a2 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -282,9 +282,12 @@ void MainWindow::forceResizeDelayed() void MainWindow::toggleFullscreen() { bool in_fullscreen = windowState() & Qt::WindowFullScreen; + //hide menu/toolbar in fullscreen (new state is !in_fullscreen) toolbar->setVisible(show_toolbar->isChecked() and in_fullscreen); + #ifndef Q_WS_MAEMO_5 + //menu bar is invisible by default on maemo menuBar()->setVisible(in_fullscreen); #endif @@ -334,6 +337,7 @@ void MainWindow::showInputPanel() { #ifdef Q_WS_MAEMO_5 vnc_view->setAttribute(Qt::WA_InputMethodEnabled, true); + QEvent event(QEvent::RequestSoftwareInputPanel); QApplication::sendEvent(vnc_view, &event); #endif diff --git a/src/vncview.cpp b/src/vncview.cpp index afe6f5f..94c0f61 100644 --- a/src/vncview.cpp +++ b/src/vncview.cpp @@ -633,6 +633,16 @@ void VncView::keyEventHandler(QKeyEvent *e) const bool pressed = (e->type() == QEvent::KeyPress); +#ifdef Q_WS_MAEMO_5 + //don't send ISO_Level3_Shift (would break things like Win+0-9) + //also enable IM so symbol key works + if(k == 0xfe03) { + setAttribute(Qt::WA_InputMethodEnabled, pressed); + e->ignore(); + return; + } +#endif + // handle modifiers if (k == XK_Shift_L || k == XK_Control_L || k == XK_Meta_L || k == XK_Alt_L) { if (pressed) { -- 1.7.9.5