dfct/TrueFramelessWindow

The window exceeds the taskbar.

Closed this issue · 10 comments

# By compiling the code, I notice that the window exceeds the taskbar.

sans titre

dfct commented

Thanks Moussa! Q, if you go into Settings -> System -> Display, what is Scale: Change the Size of text, apps and other items set to on your machine?

I have the same situation.

dfct commented

What % is the scale set to? 100%? 200%?

100%

dfct commented

Perfect, okay; I'll spin up a Windows box at 100% later today and see if I see what you see.

dfct commented

This appears to be tied to a new Windows 10 change where they muck with borders (again) (even when you claim ownership of the frame). I'm not sure why it doesn't happen at 200% DPI, but does at 100%.

I haven't found a fix yet. I've been trying the things mentioned in these SO posts as well as elsewhere, but no luck so far:

If anyone has found a workaround for this Win10, please do let me know..

I solved the problem at home, it was the geometry and I no longer see the bugs when compiling, but I can not interact with the widgets that I put on the window. Someone could show me an example.

if (wp.showCmd == SW_MAXIMIZE)
{
     //Maximized window draw 8 pixels off screen
     childWidget->setGeometry(0, 0
     , winrect.right
     , winrect.bottom);
 }
else
{
    childWidget->setGeometry(0, 0 
    , winrect.right / childWidget->window()->devicePixelRatio()
    , winrect.bottom / childWidget->window()->devicePixelRatio());
}

Hello,
For me the problem is still here when the window is maximized with areo snap.

Look at the borderless window I made. I think you'll be comfortable with it.

https://github.com/Moussa-Ball/BorderlessWindowQt-Modern-Gui