Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Mouse moving off-screen to second monitor in fullscreen  (Read 1415 times)

0 Members and 1 Guest are viewing this topic.

wizbiz

  • Newbie
  • *
  • Posts: 2
    • View Profile
Mouse moving off-screen to second monitor in fullscreen
« on: July 01, 2011, 05:51:54 am »
On my windows machine and regardless of resolution, when using full screen mode with two monitors side-by-side with the fullscreen window on Monitor 1... the mouse can just move off the right of the screen onto Monitor 2 when moved towards the edge.

Is this the intended behavior? Am I personally supposed to make sure that the mouse is contained? Just checking :)

Cheers,
wiz

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Mouse moving off-screen to second monitor in fullscreen
« Reply #1 on: July 01, 2011, 11:13:37 am »
Yes, that's the normal behavior. You can reposition the cursor with something like
Code: [Select]
if (ev.Type == Event::MouseLeft) {
    win.SetCursorPosition(0, 0);
}


You can memorize the last know position of the mouse and put it back there fro example.
SFML / OS X developer

wizbiz

  • Newbie
  • *
  • Posts: 2
    • View Profile
Mouse moving off-screen to second monitor in fullscreen
« Reply #2 on: July 01, 2011, 06:00:10 pm »
Thankyou :-)

 

anything