1 message in net.java.dev.jna.users[jna-users] Issue using X11.ButtonPre...
FromSent OnAttachments
Kim EikNov 21, 2007 5:55 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:[jna-users] Issue using X11.ButtonPressMask with both linux libX11.so in jarActions...
From:Kim Eik (kei@gmail.com)
Date:Nov 21, 2007 5:55:54 pm
List:net.java.dev.jna.users

I'd suggest you google for the X11 error in question to see if you can narrow down the parameter causing the problem.

I fiddled around a bit and it seems that i only can have one window at a time with buttonpress mask. as everything else gives me an error, but i wasnt able to conjure any buttonpresses from the window however.

XEvent is a union; the only type that will be auto-initialized is the "type" field. If you define it as a Union, you'll need to set the type before reading it. You can get away with only defining a few of the union fields, but make sure the structure is big enough to hold the biggest structure field.

thanks for clearing this up.

XEvent extends Union { public int type; public XButtonEvent xbutton; ... }

XEvent event; XNextEvent(d, event); event.setType(XButtonEvent.class); event.read(); // java fields are now properly initialized

ill let you know how creating a window on top of it all works out for me. As of now im just adding listeners to all the windows.