• Advertisement
Sign in to follow this  

GLX / Xlib, XGrabPointer

This topic is 4718 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi! How can I get continuous motion for the pointer, i.e. that it doesn't stop on the edge of the window (or root window). Is that possible, or do I have to deal with it myself, and warp the pointer to the other side of the window? I want to use pointer motion events to control a camera in my program.

Share this post


Link to post
Share on other sites
Advertisement
How about reading the mouse cursor, then set it to the middle of the screen?

Albert

Share this post


Link to post
Share on other sites
(Why aren't you using SDL? Xlib itself is going to become a legacy api in the next few years.)

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
don't warp the pointer. grabbing it will give you correct continuous motion

Share this post


Link to post
Share on other sites
Quote:
Original post by C-Junkie
(Why aren't you using SDL? Xlib itself is going to become a legacy api in the next few years.)


Mainly because I don't want to rely on SDL.
What makes you think Xlib is going to become a legacy api?

Quote:
don't warp the pointer. grabbing it will give you correct continuous motion


Unfortunatly it doesn't for me. I get positions from (0,0) - (width, height), if I restrict it to the window, if I don't restrict it, it will go the the edges of the root window, but stop there.

Care to elaborate?

I might do it as suggested by thec..

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement