Strange Rendering Issue with Qt 5.9
adam-hartshorne opened this issue · 6 comments
I am having the same problem.
Thanks for the report & screenshot! I'm looking into this now, will update again later today. Cheers
Fixed in master now! The issue was tied to this bugfix: https://bugreports.qt.io/browse/QTBUG-40578 . An patchset in it landed in Qt 5.9 and reworked a lot of the window size/frame calculation logic, breaking TrueFramelessWindow.
After literally five hours of painful debugging, I can confidently state the fix is moving the FramelessWindowHint up five lines. 💯
Best I understand now, for anyone stumbling across this with a similar issue in the future, the frameless window hint must be set before the window is created by Qt, otherwise it calculates the margins and doesn't ever let that go. In my case, I was setting the hint after calling winId which creates the window.
Qt has some internal mechanisms to otherwise set custom margins with QWindowsWindow::setCustomMargins() and the _q_windowsCustomMargins property, but I'm not sure they're fully implemented / intended to be exposed. I couldn't figure out a way to make use of those.
But when the window is in full screen mode, it leaves a small border that goes beyond the windows task
bar.
@Moussa-Ball , can you open a new issue for the small border beyond the windows task bar? I can't reproduce that on my machine at the moment.