SFML community forums

Help => Window => Topic started by: bialpio on May 14, 2010, 06:00:32 pm

Title: SetCursorPosition not working
Post by: bialpio on May 14, 2010, 06:00:32 pm
We are trying to reset position of mouse cursor to window centre after every frame. We're positive that the code is correct as it was used with different library earlier. It basically seems like SFML 1.6 Window::setCursorPosition makes no effect. Is that a bug or should we enable something?

BTW, is there any way to get relative mouse movement?

PS. Yes, we did search the forum.
Title: SetCursorPosition not working
Post by: Laurent on May 14, 2010, 06:20:41 pm
What OS do you use? Can you show a minimal example that reproduces this problem?

Quote
BTW, is there any way to get relative mouse movement?

Not directly, but you can easily do this based on the absolute positions.
Title: SetCursorPosition not working
Post by: ozzy vbg on August 23, 2010, 01:06:50 pm
I am also having this problem, but only in Ubuntu 10.04 LTS, and would like to know if TC found a solution?

Everything works fine under Windows XP and 7. The problem only occurs in Ubuntu. I tried turning off Visual Effects in Appearance Preferences but noticed no change (except that now my window has borders).

I appreciate any help!
Title: SetCursorPosition not working
Post by: ozzy vbg on August 23, 2010, 02:17:58 pm
Oh, sorry, I forgot to mention that my Ubuntu machine is a virtual one in VirtualBox. My host computer is running Windows 7 Ultimate and my guest, the Ubuntu one, has virtualbox guest additions intalled.
Title: SetCursorPosition not working
Post by: ozzy vbg on August 24, 2010, 06:40:58 pm
After installing Ubuntu on a USB thumbdrive and running it natively on my computer, the problem disappeared. Even the small one with window borders not showing up.

Sorry for not doing thorough research before asking for help. Hopefully this will be of help to others trying do development on virtual machines..  :wink:

I guess game development testing shouldn't really be done through virtualization...  :P