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

Author Topic: Fullscreen button and fullscreen style behaviour differs on macOS  (Read 1188 times)

0 Members and 1 Guest are viewing this topic.

junglie85

  • Newbie
  • *
  • Posts: 4
    • View Profile
I'm struggling to understand what is going on with the fullscreen behaviour on macOS. When I click the fullscreen button on the titlebar, the RenderWindow appears to scale (this is the behaviour I want in this instance). However, when I set the window style to fullscreen, the scale does not change.

Have I understood this default behaviour correctly?

I don't really know what components are interacting and how in the fullscreen button case to replicate the behaviour. How do I configure the SFML window to use the same behaviour for both the OS fullscreen button and when setting the fullscreen style?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10800
    • View Profile
    • development blog
    • Email
Re: Fullscreen button and fullscreen style behaviour differs on macOS
« Reply #1 on: May 04, 2022, 08:55:18 am »
The missing thing is that the view is created to match the original window size, but doesn't automatically adjust when changing the window size.

So in the first instance, the view remains the same, but the window size changes. And in the second instance, you're creating a window with a matching view to start with.

See this tutorial for more information: https://www.sfml-dev.org/tutorials/2.5/graphics-view.php#showing-more-when-the-window-is-resized
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

junglie85

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Fullscreen button and fullscreen style behaviour differs on macOS
« Reply #2 on: May 04, 2022, 09:07:07 am »
Ah, perfect, thank you. I shall dig into that. The jigsaw pieces are coming together!