QWindowContainer: Restrict check for negative position to child windows.

Otherwise, the code triggers for top level windows in setups with
multimonitors where the primary screen is on the right and the left
monitor has negative coordinates.

Task-number: QTBUG-43879
Task-number: QTBUG-38475
Change-Id: Ied3ee6dc59bd784e11db22031d2090cc6f42ef8b
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
This commit is contained in:
Friedemann Kleint 2015-01-20 11:17:02 +01:00
parent c88e354993
commit eb92a531c0

View File

@ -64,7 +64,7 @@ public:
void updateGeometry() {
Q_Q(QWindowContainer);
if (q->geometry().bottom() <= 0 || q->geometry().right() <= 0)
if (!q->isWindow() && (q->geometry().bottom() <= 0 || q->geometry().right() <= 0))
/* Qt (e.g. QSplitter) sometimes prefer to hide a widget by *not* calling
setVisible(false). This is often done by setting its coordinates to a sufficiently
negative value so that its clipped outside the parent. Since a QWindow is not clipped