aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorghost <andreas.monzner@multimedia-labs.de>2010-02-13 18:47:15 +0100
committerghost <andreas.monzner@multimedia-labs.de>2010-02-13 18:47:41 +0100
commit1fc2700e351c0297089925aba6c3a7b890dfb077 (patch)
tree0b90771f6201b23393da84f8eaeb6bf33d86179c /lib
parenta37ddbb7785de5f1d944f4937a5b2914ce6a3862 (diff)
downloadenigma2-1fc2700e351c0297089925aba6c3a7b890dfb077.tar.gz
enigma2-1fc2700e351c0297089925aba6c3a7b890dfb077.zip
lib/driver/rc.cpp,rcinput.cpp: only do EVIOCGRAB when event bit 0x1E is set in event device evbits
Diffstat (limited to 'lib')
-rw-r--r--lib/driver/rc.cpp5
-rw-r--r--lib/driver/rcinput.cpp3
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/driver/rc.cpp b/lib/driver/rc.cpp
index c56fde44..c1ff13ea 100644
--- a/lib/driver/rc.cpp
+++ b/lib/driver/rc.cpp
@@ -129,8 +129,11 @@ void eRCInputEventDriver::setExclusive(bool b)
{
if (handle >= 0)
{
+ long evbits;
int grab = b;
- if (::ioctl(handle, EVIOCGRAB, grab) < 0)
+ if (::ioctl(handle, EVIOCGBIT(0, EV_MAX+1), &evbits) < 0)
+ perror("EVIOCGBIT");
+ else if ((evbits & (1 << 0x1E)) && ::ioctl(handle, EVIOCGRAB, grab) < 0)
perror("EVIOCGRAB");
}
}
diff --git a/lib/driver/rcinput.cpp b/lib/driver/rcinput.cpp
index e593087d..2bfeefa1 100644
--- a/lib/driver/rcinput.cpp
+++ b/lib/driver/rcinput.cpp
@@ -89,7 +89,8 @@ eRCDeviceInputDev::eRCDeviceInputDev(eRCInputEventDriver *driver)
void eRCDeviceInputDev::setExclusive(bool b)
{
- driver->setExclusive(!iskeyboard && b);
+ if (!iskeyboard)
+ driver->setExclusive(b);
}
const char *eRCDeviceInputDev::getDescription() const