summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Hill <colin.james.hill@gmail.com>2011-02-08 17:54:03 -0800
committerColin Hill <colin.james.hill@gmail.com>2011-02-08 17:54:03 -0800
commit4ad0c2c2633130dacf27b2c126d96cee2e142b09 (patch)
treec897de5daa7b65a07184fe9fe9ae053abde32fc5
parentc9f8827966af271a6a5f39b263875e4e81c1567a (diff)
Nested input structs.
-rw-r--r--src/xlibclient.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/xlibclient.c b/src/xlibclient.c
index da6ea26..7079a23 100644
--- a/src/xlibclient.c
+++ b/src/xlibclient.c
@@ -34,6 +34,8 @@
#include "client.h"
+#include "xNestedMouse.h"
+
struct NestedClientPrivate {
Display *display;
int screenNumber;
@@ -266,6 +268,17 @@ NestedClientTimerCallback(NestedClientPrivatePtr pPriv) {
}
if (ev.type == MotionNotify) {
+
+ // Create a nested input event and send it to the input driver.
+ NestedInputEvent nev;
+ nev.type = NestedMouseMotion;
+
+ nev.data.mouseMotion.x = ((XMotionEvent*)&ev)->x;
+ nev.data.mouseMotion.y = ((XMotionEvent*)&ev)->y;
+
+ NestedPostInputEvent(nev);
+
+ /*
XDrawString(pPriv->display, pPriv->window,
DefaultGC(pPriv->display, pPriv->screenNumber),
((XMotionEvent*)&ev)->x, ((XMotionEvent*)&ev)->y,
@@ -274,6 +287,7 @@ NestedClientTimerCallback(NestedClientPrivatePtr pPriv) {
DefaultGC(pPriv->display, pPriv->screenNumber),
((XMotionEvent*)&ev)->x_root,
((XMotionEvent*)&ev)->y_root, msg2, strlen(msg2));
+ */
}
if (ev.type == EnterNotify) {