1 --- qt-everywhere-opensource-src-4.7.0/src/gui/embedded/qkbdlinuxinput_qws.cpp 2010-09-10 11:05:24.000000000 +0200
2 +++ qt-everywhere-opensource-src-4.7.0/src/gui/embedded/qkbdlinuxinput_qws.cpp.mod 2011-04-28 21:57:04.208449828 +0200
4 QString dev = QLatin1String("/dev/input/event1");
9 QStringList args = device.split(QLatin1Char(':'));
10 foreach (const QString &arg, args) {
12 repeat_delay = arg.mid(13).toInt();
13 else if (arg.startsWith(QLatin1String("repeat-rate=")))
14 repeat_rate = arg.mid(12).toInt();
15 + else if (arg.startsWith(QLatin1String("grab=")))
16 + grab = arg.mid(5).toInt();
17 else if (arg.startsWith(QLatin1String("/dev/")))
21 m_fd = QT_OPEN(dev.toLocal8Bit().constData(), O_RDWR, 0);
23 + ::printf("grab kbd: %d\n", grab);
24 + ::ioctl(m_fd, EVIOCGRAB, grab);
25 if (repeat_delay > 0 && repeat_rate > 0) {
26 int kbdrep[2] = { repeat_delay, repeat_rate };
27 ::ioctl(m_fd, EVIOCSREP, kbdrep);
28 --- qt-everywhere-opensource-src-4.7.0/src/gui/embedded/qmouselinuxinput_qws.cpp 2010-09-10 11:05:24.000000000 +0200
29 +++ qt-everywhere-opensource-src-4.7.0/src/gui/embedded/qmouselinuxinput_qws.cpp.mod 2011-04-28 21:57:13.358562410 +0200
33 #include <QSocketNotifier>
34 +#include <QStringList>
36 #include <qplatformdefs.h>
37 #include <private/qcore_unix_p.h> // overrides QT_OPEN
39 setObjectName(QLatin1String("LinuxInputSubsystem Mouse Handler"));
41 QString dev = QLatin1String("/dev/input/event0");
42 - if (device.startsWith(QLatin1String("/dev/")))
46 + QStringList args = device.split(QLatin1Char(':'));
47 + foreach (const QString &arg, args) {
48 + if (arg.startsWith(QLatin1String("grab=")))
49 + grab = arg.mid(5).toInt();
50 + else if (arg.startsWith(QLatin1String("/dev/")))
54 m_fd = QT_OPEN(dev.toLocal8Bit().constData(), O_RDONLY | O_NDELAY, 0);
56 + ::printf("grab mouse: %d\n", grab);
57 + ::ioctl(m_fd, EVIOCGRAB, grab);
58 m_notify = new QSocketNotifier(m_fd, QSocketNotifier::Read, this);
59 connect(m_notify, SIGNAL(activated(int)), this, SLOT(readMouseData()));