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

Author Topic: Strange behaviour when increasing size of window  (Read 1509 times)

0 Members and 1 Guest are viewing this topic.

lafoniz

  • Newbie
  • *
  • Posts: 19
    • View Profile
Strange behaviour when increasing size of window
« on: January 24, 2017, 05:39:38 pm »
Hello everyone. I have noticed weird behavior of sf::RenderWindow instance when user is trying to increase size of it manually (at run-time).

If you hold a mouse button on border to increase size of window you will see something like this: http://imgur.com/a/wxy3G
Those graphical "artifacts" will vanish after you release mouse button, however I'm not aware of any way to prevent them in the first place, is there any?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Re: Strange behaviour when increasing size of window
« Reply #1 on: January 24, 2017, 05:57:13 pm »
While dragging or resizing the window, the application will "halt" in the event processing, which leads to no rendering shown. In most cases this rarely matters, but if you don't want it, you can process events in a separate thread - which of course will bring in its own troubles.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

lafoniz

  • Newbie
  • *
  • Posts: 19
    • View Profile
Re: Strange behaviour when increasing size of window
« Reply #2 on: January 24, 2017, 06:20:34 pm »
Thanks for tip, I will try to handle events in their own thread, gonna see how it works out.

 

anything