setting the mouse position...
hi !
can''t find anything in google / rest of the web about how to set the mouse-pointer''s position in linux/x.
is there any Xlib function to do this ?
need this to have the possibility for infinite mouse movement...
September 05, 2002 09:30 PM
XWarpPointer is what you''re looking for. It''s in the Xlib manual (man XWarpPointer), or do a search on google if you don''t have the man pages.
Hope this helps.
Hope this helps.
mmh... ok that would be a possibility...
i''ve read, that XWarpPointer sends a MotionNotify message... and that''s bad for my purposes. i wanted to have inifinite mouse movement (i.e. for a quake-like game).
the only way to do this (which i know) would be to read the mouse-position every loop & get the difference to the start position. then reset its position again. but when the function causes a motion-message, the app would think, the mouse had moved.
is there any way to query the relative mouse movement ?
or is there maybe another function that sets the pointer''s position without generating a MotionNotify message ?
if not, i''ll just have to set a flag, each time the mouse was reset & ignore the next movement, if the flag is set... but that would be my second-choice solution.
if there''s some other way... plz tell me !
if not... thx for help... the XWarpPointer function will also do.
(somehow)
i''ve read, that XWarpPointer sends a MotionNotify message... and that''s bad for my purposes. i wanted to have inifinite mouse movement (i.e. for a quake-like game).
the only way to do this (which i know) would be to read the mouse-position every loop & get the difference to the start position. then reset its position again. but when the function causes a motion-message, the app would think, the mouse had moved.
is there any way to query the relative mouse movement ?
or is there maybe another function that sets the pointer''s position without generating a MotionNotify message ?
if not, i''ll just have to set a flag, each time the mouse was reset & ignore the next movement, if the flag is set... but that would be my second-choice solution.
if there''s some other way... plz tell me !
if not... thx for help... the XWarpPointer function will also do.
(somehow)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement