summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2006-07-23 18:47:51 -0400
committerDaniel Stone <daniels@endtroducing.fooishbar.org>2006-07-23 18:47:51 -0400
commit8f05f55390f138deeb17fd16259ce2928cc0d1f0 (patch)
treea0b66683ee3ae872b8b426838c457f4825c942b6
parent70ec118ecaeeaad781fa2d5010a20bcf14afcbd9 (diff)
fix core event toggling
Fix hopelessly broken core event toggling.
-rw-r--r--xsetpointer.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/xsetpointer.c b/xsetpointer.c
index 064e581..a46c342 100644
--- a/xsetpointer.c
+++ b/xsetpointer.c
@@ -129,12 +129,16 @@ main(int argc, char * argv[])
if (argc == 3 && devices[loop].name &&
StrCaseCmp(devices[loop].name, argv[2]) == 0) {
#ifdef DEBUG
- fprintf(stderr, "opening device %s\n",
- devices[loop].name ? devices[loop].name : "<noname>");
+ fprintf(stderr, "opening device %s at %d\n",
+ devices[loop].name ? devices[loop].name : "<noname>",
+ devices[loop].id);
#endif
device = XOpenDevice(dpy, devices[loop].id);
if (device) {
+ fprintf(stderr, "device successfully opened\n");
corectl.status = (core - 1);
+ corectl.length = sizeof(int);
+ corectl.control = DEVICE_CORE;
XChangeDeviceControl(dpy, device, DEVICE_CORE,
(XDeviceControl *)&corectl);
exit(0);