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

Author Topic: Fullscreen on Linux doesn't behave the way I'd want it to  (Read 2074 times)

0 Members and 2 Guests are viewing this topic.

gogep

  • Newbie
  • *
  • Posts: 3
    • View Profile
Fullscreen on Linux doesn't behave the way I'd want it to
« on: February 06, 2023, 09:53:22 pm »
When I create a SFML window with the sf::Style::Fullscreen style, it captures my mouse pointer, making it impossible to leave the window (edit: I have two monitors); it's also impossible to undo the fullscreen through WM. Moreso, if I also specify a video mode appropriate for fullscreen, it even flashes my monitors. It makes me think of exclusive fullscreen, although I've heard many times that it's not a thing on Linux so I'm not sure.

But my point is, I don't want this behavior. It's annoying for the user and it doesn't match any Linux-native game I've played either. They all seem to behave exactly as if they were set to fullscreen by the WM, which is what I'd want as well. Making a borderless window size of the screen and positioning it appropriately doesn't cut it because some WMs (including bspwm which I'm using) still have ways of moving such windows.

I'm interested in knowing how all those games set their windows to fullscreen, and how can I achieve that with SFML. I can get Xlib's Window struct from getSystemHandle(), but pretty much all useful Xlib functions require Display* and SFML doesn't provide it; although it's just the connection to Xorg so I'm not sure if I need the same one

 

anything