SleepTimerEdit.py: add missing Sleeptimer ask save
[enigma2.git] / lib / driver / rc.cpp
index c56fde448cd396ea72af4be94b4655e368b5e9bb..c1ff13ea7dee30a539a3520935d621b3a180c0d4 100644 (file)
@@ -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");
        }
 }