summaryrefslogtreecommitdiff
path: root/src/KeyboardDevice.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/KeyboardDevice.cpp')
-rw-r--r--src/KeyboardDevice.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/KeyboardDevice.cpp b/src/KeyboardDevice.cpp
index 3cfaac3..05a1e1f 100644
--- a/src/KeyboardDevice.cpp
+++ b/src/KeyboardDevice.cpp
@@ -3,17 +3,12 @@
int KeyboardDevice::counter = 0;
-KeyboardDevice::KeyboardDevice(XDeviceInfo* dev, XConn* x11, Manager* manager)
+KeyboardDevice::KeyboardDevice(XIDeviceInfo* dev, XConn* x11, Manager* manager)
{
- XDevice* d = XOpenDevice(x11->dpy, dev->id);
-
- if (!d)
- throw new DeviceError(DeviceError::OPEN_FAILED);
this->x11 = x11;
this->kbdID = KeyboardDevice::counter++;
this->name = string(dev->name);
- this->id = dev->id;
- this->dev = d;
+ this->id = dev->deviceid;
this->paired = NULL;
TRACE("Keyboard %d (%s) initialised\n", kbdID, dev->name);
}