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

Author Topic: Issue with setMouseCursorVisible & setMouseCursorGrabbed on Linux  (Read 2187 times)

0 Members and 1 Guest are viewing this topic.

Luca

  • Newbie
  • *
  • Posts: 3
    • View Profile
Hi there. I'm new on Linux, but have some pleasant experiences with SFML. I have some problems with mouse commands:
- setMouseCursorVisible works
- setMouseCursorGrabbed works
BUT if they used together, sometimes window margins are wrong for grabbing (little shift down and right), or grubbing happens only after first click in window and cursor invisible at window tilebar too

- sf::Mouse::setPosition does nothing AND frees mouse from previous two states. Looping "setMouseCursorGrabbed" changes nothing, looping "setMouseCursorVisible" creates flickering

It's pure Debian, GNOME, SFML installed via apt. What is wrong and what can I do? Maybe I can do some tests or give you more info?
« Last Edit: October 25, 2023, 09:19:20 am by eXpl0it3r »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: Issue with setMouseCursorVisible & setMouseCursorGrabbed on Linux
« Reply #1 on: October 25, 2023, 09:28:41 am »
I split it from the other thread as it's pretty much unrelated.

Do you use Wayland?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Luca

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Issue with setting Mouse Position on Arch Linux
« Reply #2 on: October 25, 2023, 11:58:08 am »
I've changed my session type from gnome to gnome Xorg and problem resolved. Seems like it's the exact same issue.

Luca

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Issue with setMouseCursorVisible & setMouseCursorGrabbed on Linux
« Reply #3 on: October 25, 2023, 12:00:44 pm »
Sorry for second answer in the previous tread. It seems that problem resolved the exact same way: I've changed my session type from gnome to gnome Xorg and everything works good. And yes, by default GNOME uses Wayland.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: Issue with setMouseCursorVisible & setMouseCursorGrabbed on Linux
« Reply #4 on: October 25, 2023, 12:29:05 pm »
Okay, so it was related, but not very clear from the message. As non-Linux user, I wouldn't know that GNOME switch to default for Wayland :D
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: Issue with setMouseCursorVisible & setMouseCursorGrabbed on Linux
« Reply #5 on: October 25, 2023, 12:34:44 pm »
Can you try to build SFML 2.6.0 from source?

Maybe there has already been a fix for it?

For now, I've created an issue to track it: https://github.com/SFML/SFML/issues/2750
« Last Edit: October 25, 2023, 12:37:21 pm by eXpl0it3r »
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

 

anything