5 messages in net.java.dev.jna.usersRe: [jna-users] vm crash when receivi...
FromSent OnAttachments
Erik RomsonDec 30, 2007 3:33 am 
Timothy WallDec 30, 2007 7:04 am 
Erik RomsonDec 30, 2007 2:13 pm 
Timothy WallJan 1, 2008 6:53 pm 
Timothy WallJan 3, 2008 12:40 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [jna-users] vm crash when receiving XEvents from x11 on LinuxActions...
From:Timothy Wall (twal@dev.java.net)
Date:Jan 1, 2008 6:53:54 pm
List:net.java.dev.jna.users

But when I run it wo actually checking the event, the whole IDE locks up and no events are picked up from other applications. I'm aware of that this is not a JNA question but I'm stuck (and desperate). Am I doing something wrong? I want to pick up all mouse and key events from all applications. How should I do this?

I found this from you:

-------------- I think the standard way to track *all* input events under X is to create an Input-only window that covers the root window. I don't think the various subwindows are going to be very happy to have their input masks changed out from under them (security restrictions against this may be what's causing the error you see).

------------------ Am I doing this?

When in doubt, write the program and test it in C first. Make sure you do XSelectInput for the events of interest. You might see if you can locate an X11 usenet FAQ, which might have an answer to tracking events globally.

The original poster was changing the event mask for every window; that's something you have to do explicitly via XSelectInput, so I doubt you're doing that.

I think you can probably just listen to events on the root window and all its descendants, rather than creating an InputOnly window.