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

Author Topic: Black rectangle on top of window (sometimes)  (Read 871 times)

0 Members and 1 Guest are viewing this topic.

malyninja

  • Newbie
  • *
  • Posts: 2
    • View Profile
Black rectangle on top of window (sometimes)
« on: February 03, 2018, 05:20:12 pm »
Hi everyone.
I've recently started with SFML and I've got a problem. I was looking for solving but it hard to describe what exactly I want to find. When I set the window to fullscreen, sometimes there is black rectangle on top of window. It looks like the screen has been moved down, because I can't insert even a cursor in this area.

Printscreens:
what I want:

what it looks like if problem occurs:


This problem occurs randomly, sometimes few times in a row, sometimes it hard to catch the problem.

There is no matter how the code looks like, but every time started like this:
sf::VideoMode desktop = sf::VideoMode::getDesktopMode();
sf::RenderWindow window(desktop, "SFML window", sf::Style::Fullscreen);
window.setMouseCursorVisible(false);
window.setFramerateLimit(60);

I don't know if it is problem connected with the SFML or with my system/screen drivers. I use Linux Mint and I installed library by apt-get install.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10819
    • View Profile
    • development blog
    • Email
Re: Black rectangle on top of window (sometimes)
« Reply #1 on: February 03, 2018, 06:14:17 pm »
What GPU driver do you use?
What GPU do you have?
What window manager are you using?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

malyninja

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Black rectangle on top of window (sometimes)
« Reply #2 on: February 03, 2018, 09:25:37 pm »
My gpu: GeForce GTX 765M
Gpu driver: NVIDIA Driver v. 384.111
Window manager: Mutter (Muffin) ? cinamon 3.6.7

more info:
https://gist.github.com/anonymous/354ff802401fa00520ae6c0ee0e51bce

And now, when I launched my application, this black rectangle was on bottom of thhe screen. I thought that is because the application doesn't detect my screen resolution. I checked and this is output:
1920x1080
1918x1023
code:
std::cout << desktop.width << "x" << desktop.height << std::endl;
std::cout << window.getSize().x << "x" << window.getSize().y << std::endl

But even when the problem does not occu, output is the same.
« Last Edit: February 03, 2018, 10:37:01 pm by malyninja »