deimos1877/BorderlessWindow

Strange Rendering Issues with Qt 5.9

Opened this issue · 3 comments

Everything worked perfectly upto QT 5.8, but when I rebuild this with 5.9 I don't get the window title / icons appearing and there is a strange extra area of window added when you make the window larger than a certain size. You also can't grab the edge of the window and resize it.

In the picture I have attached, I changed the borderless window background to black so that you can clearly see this extra area.

I also notice that when you render things in the main window, you see that flicker in this extra area.

qt_borderless_rendering_issue

Hi.
I don't have QT 5.9 right now, so i can't really say anything. Are you sure that my project causes this problem? From description, it doesn't sound like it. I will test it later when i get my hands on 5.9 version.

It appears to be something has changed in the way in which QT interacts with Winapi, see a similar project to your own with a very similar problem.

leafcode/libsleek#3 (comment)

I have got yet another implementation that achieves this borderless window a slightly different way and that continues to function in 5.9, but it no where near as smooth when you resize so I would prefer to continue to use your implementation.

dfct commented

I can save you further debugging, just had to fix & figure this out myself - dfct/TrueFramelessWindow#4

Qt 5.9 introduced a patch that changes how they calculate window frame sizes. If you want custom frame margins (say, zero margins), you need to have FramelessWindowHint set before the window is created such as via winId(). There's a whole bunch of new code and probably alternative methods, but this was the best I could figure out.