diff options
author | Tom Cooksey <thomas.cooksey@nokia.com> | 2009-05-28 12:18:15 (GMT) |
---|---|---|
committer | Tom Cooksey <thomas.cooksey@nokia.com> | 2009-05-28 12:18:15 (GMT) |
commit | 50576bd26cd5fb1316f0844ab6da76910d124edd (patch) | |
tree | 84b6f2103a60e08a3ea8f1ba8d985b33a710792a /src/gui/embedded | |
parent | 27d979b0ea39922e6e2ae3a3cc6a4d45c9c8f0e9 (diff) | |
parent | 353afc392b843519023f27753b45b2e6fd9467ff (diff) | |
download | Qt-50576bd26cd5fb1316f0844ab6da76910d124edd.zip Qt-50576bd26cd5fb1316f0844ab6da76910d124edd.tar.gz Qt-50576bd26cd5fb1316f0844ab6da76910d124edd.tar.bz2 |
Merge branch '4.5'
Conflicts:
src/gui/embedded/qkbdtty_qws.cpp
Diffstat (limited to 'src/gui/embedded')
-rw-r--r-- | src/gui/embedded/qkbdtty_qws.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gui/embedded/qkbdtty_qws.cpp b/src/gui/embedded/qkbdtty_qws.cpp index 31489cf..3489278 100644 --- a/src/gui/embedded/qkbdtty_qws.cpp +++ b/src/gui/embedded/qkbdtty_qws.cpp @@ -89,6 +89,7 @@ private: struct termios m_tty_attr; char m_last_keycode; int m_vt_qws; + int m_originalKbdMode; }; @@ -150,6 +151,9 @@ QWSTtyKbPrivate::QWSTtyKbPrivate(QWSTtyKeyboardHandler *h, const QString &device tcgetattr(m_tty_fd, &termdata); #if defined(Q_OS_LINUX) + // record the original mode so we can restore it again in the constructor + ::ioctl(m_tty_fd, KDGKBMODE, m_originalKbdMode); + // PLEASE NOTE: // The tty keycode interface can only report keycodes 0x01 .. 0x7f // KEY_MAX is however defined to 0x1ff. In practice this is sufficient @@ -206,10 +210,9 @@ QWSTtyKbPrivate::~QWSTtyKbPrivate() { if (m_tty_fd >= 0) { #if defined(Q_OS_LINUX) - ::ioctl(m_tty_fd, KDSKBMODE, K_XLATE); + ::ioctl(kbdFD, KDSKBMODE, m_originalKbdMode); #endif tcsetattr(m_tty_fd, TCSANOW, &m_tty_attr); - QT_CLOSE(m_tty_fd); } } |