diff options
author | Jiang Jiang <jiang.jiang@nokia.com> | 2011-07-20 13:35:01 (GMT) |
---|---|---|
committer | Jiang Jiang <jiang.jiang@nokia.com> | 2011-07-20 13:35:01 (GMT) |
commit | b930e258a14b851360d08be373c28f912d2242b0 (patch) | |
tree | 080e0d2d2dbf0b2bd3576ccf784ceb643ae79a13 /src/gui/embedded/qkbdlinuxinput_qws.cpp | |
parent | 9a79b2bccba4ac80ab7b5d13d7ad3651bde06893 (diff) | |
parent | 4e2a44d6d56f2c28709ef9687ca10b820332dd5f (diff) | |
download | Qt-b930e258a14b851360d08be373c28f912d2242b0.zip Qt-b930e258a14b851360d08be373c28f912d2242b0.tar.gz Qt-b930e258a14b851360d08be373c28f912d2242b0.tar.bz2 |
Merge remote branch 'review/master' into staging
Diffstat (limited to 'src/gui/embedded/qkbdlinuxinput_qws.cpp')
-rw-r--r-- | src/gui/embedded/qkbdlinuxinput_qws.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/embedded/qkbdlinuxinput_qws.cpp b/src/gui/embedded/qkbdlinuxinput_qws.cpp index 376b0d0..b2e7cb3 100644 --- a/src/gui/embedded/qkbdlinuxinput_qws.cpp +++ b/src/gui/embedded/qkbdlinuxinput_qws.cpp @@ -103,6 +103,7 @@ QWSLinuxInputKbPrivate::QWSLinuxInputKbPrivate(QWSLinuxInputKeyboardHandler *h, QString dev = QLatin1String("/dev/input/event1"); int repeat_delay = -1; int repeat_rate = -1; + int grab = 0; QStringList args = device.split(QLatin1Char(':')); foreach (const QString &arg, args) { @@ -110,12 +111,15 @@ QWSLinuxInputKbPrivate::QWSLinuxInputKbPrivate(QWSLinuxInputKeyboardHandler *h, repeat_delay = arg.mid(13).toInt(); else if (arg.startsWith(QLatin1String("repeat-rate="))) repeat_rate = arg.mid(12).toInt(); + else if (arg.startsWith(QLatin1String("grab="))) + grab = arg.mid(5).toInt(); else if (arg.startsWith(QLatin1String("/dev/"))) dev = arg; } m_fd = QT_OPEN(dev.toLocal8Bit().constData(), O_RDWR, 0); if (m_fd >= 0) { + ::ioctl(m_fd, EVIOCGRAB, grab); if (repeat_delay > 0 && repeat_rate > 0) { int kbdrep[2] = { repeat_delay, repeat_rate }; ::ioctl(m_fd, EVIOCSREP, kbdrep); |