diff options
author | Colin Hill <colin.james.hill@gmail.com> | 2011-02-08 17:54:03 -0800 |
---|---|---|
committer | Colin Hill <colin.james.hill@gmail.com> | 2011-02-08 17:54:03 -0800 |
commit | 4ad0c2c2633130dacf27b2c126d96cee2e142b09 (patch) | |
tree | c897de5daa7b65a07184fe9fe9ae053abde32fc5 | |
parent | c9f8827966af271a6a5f39b263875e4e81c1567a (diff) |
Nested input structs.
-rw-r--r-- | src/xlibclient.c | 14 |
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) { |