View Full Version : Input through X11 event
08-02-2012, 03:19 PM
No need to bother with my other question regarding input. On a related note, I am wondering if anyone knows whether an XEvent will still work properly if passed to a function as an argument. I am sorry for being a bother with my questions. Once this project to which my questions pertain is finished, I will be able to help people with geometry and other math-related issues in OpenGL.
08-03-2012, 06:40 AM
...wondering if anyone knows whether an XEvent will still work properly if passed to a function as an argument.
XEvent is a union typedef (you can verify this by looking in /usr/include/X11/Xlib.h). So, you typically wouldn't pass it as "XEvent val" as this would copy the whole union (which is fairly large, as it is a union of different structs), but rather would pass it by reference via "XEvent &val" (if C++) or "XEvent *val" (C or C++).
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.