Windows: Fix maximizing frameless windows on secondary screens.
authorSérgio Martins <sergio.martins@kdab.com>
Wed, 11 Jun 2014 11:54:21 +0000 (12:54 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Wed, 11 Jun 2014 14:42:43 +0000 (16:42 +0200)
commitdbe6db192aa1a3e708b00a98a17636af37ceec27
tree116dc913f967f1e02d10d78d7f8838facfd822e6
parentf65333b027463ea40e0cd4603e48fca62d60216a
Windows: Fix maximizing frameless windows on secondary screens.

They would either disappear or be positioned at bogus coordinates.

The MINMAXINFO structure works with coords from the primary screen
then uses an "interesting" algorithm to adjust to secondary screen:

Say you have a primary screen with width=1000 and secondary screen
with width=2000, here's what you get when you set ptMaxSize to:

ptMaxSize.x   | Size window gets in second screen
--------------------------------------------------
    500       |                500
    1000      |               2000
    1001      |               2001
    1100      |               2100

So basically you can't get any value between 1000 and 1999

How many people use the taskbar on a second display and maximimize
a frameless window anyway ?

Task-number: QTBUG-39537
Change-Id: Ic9b3120e7fb5a9a5d97828a2e44be02ae587b92e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
src/plugins/platforms/windows/qwindowswindow.cpp