diff options
| author | ghost <andreas.monzner@multimedia-labs.de> | 2009-12-22 15:56:53 +0100 |
|---|---|---|
| committer | ghost <andreas.monzner@multimedia-labs.de> | 2009-12-22 15:56:53 +0100 |
| commit | 089c965d09e2af09a4731ff164e1b68b3daf8047 (patch) | |
| tree | f7fcc1a132b54fa46ae47421cfffa4af9b8c7814 | |
| parent | 41b99d4a2d737817b75c93c8331f038326d13862 (diff) | |
| parent | e8eb8e9694379204f4b9143ca6b33db48809df7f (diff) | |
| download | enigma2-089c965d09e2af09a4731ff164e1b68b3daf8047.tar.gz enigma2-089c965d09e2af09a4731ff164e1b68b3daf8047.zip | |
Merge commit 'e8eb8e9694379204' into experimental
| -rw-r--r-- | lib/driver/rc.cpp | 10 | ||||
| -rw-r--r-- | lib/driver/rc.h | 1 | ||||
| -rw-r--r-- | lib/driver/rcinput.cpp | 1 |
3 files changed, 12 insertions, 0 deletions
diff --git a/lib/driver/rc.cpp b/lib/driver/rc.cpp index c7acd113..8dab0201 100644 --- a/lib/driver/rc.cpp +++ b/lib/driver/rc.cpp @@ -127,6 +127,16 @@ std::string eRCInputEventDriver::getDeviceName() return name; } +void eRCInputEventDriver::setExclusive(bool b) +{ + if (handle >= 0) + { + int grab = b; + if (::ioctl(handle, EVIOCGRAB, &grab) < 0) + perror("EVIOCGRAB"); + } +} + eRCInputEventDriver::~eRCInputEventDriver() { if (handle>=0) diff --git a/lib/driver/rc.h b/lib/driver/rc.h index 9708ea7b..ef0588c4 100644 --- a/lib/driver/rc.h +++ b/lib/driver/rc.h @@ -112,6 +112,7 @@ public: std::string getDeviceName(); eRCInputEventDriver(const char *filename); ~eRCInputEventDriver(); + void setExclusive(bool b); // in exclusive mode data is not carried to console device }; class eRCKey diff --git a/lib/driver/rcinput.cpp b/lib/driver/rcinput.cpp index d10d94f3..0aada8df 100644 --- a/lib/driver/rcinput.cpp +++ b/lib/driver/rcinput.cpp @@ -83,6 +83,7 @@ eRCDeviceInputDev::eRCDeviceInputDev(eRCInputEventDriver *driver) break; } } + driver->setExclusive(!iskeyboard); eDebug("Input device \"%s\" is %sa keyboard.", id.c_str(), iskeyboard ? "" : "not "); } |
