How can I set the cursor position in X Window??

Started by
5 comments, last by nckchan 22 years, 2 months ago
I''m using C++ to implement a first person view walk through program. I want to use a mouse to control the orientation of the camera. So I want to set the cursor to the center of the window and check the value away from the center after the mouse is moved. However, I don''t know how to set the cursor to the specific position. Can anyone help me???? Thx chikit
chikit
Advertisement
Platform? API?

If it''s Win32, look into SetCursorPosition().

[ GDNet Start Here | GDNet Search Tool | GDNet FAQ | MS RTFM [MSDN] | SGI STL Docs | Google! ]
Thanks to Kylotan for the idea!
He said X Window.

Edit: I don't find anything, and I doubt it is even possible, since the mouse position data is on the client side.

Edited by - Fruny on January 29, 2002 3:55:03 PM
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
XWarpPointer() (<gdkx.h>)

[ GDNet Start Here | GDNet Search Tool | GDNet FAQ | MS RTFM [MSDN] | SGI STL Docs | Google! ]
Thanks to Kylotan for the idea!
grumph
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
I''m just that good

[ GDNet Start Here | GDNet Search Tool | GDNet FAQ | MS RTFM [MSDN] | SGI STL Docs | Google! ]
Thanks to Kylotan for the idea!
Thx for reply!!
let''s me try it

Thx

chikit
chikit

This topic is closed to new replies.

Advertisement