add/remove window only when the window is shown/hidden
Task-number: QTBUG-34469 Change-Id: Id77cf738f96bb94582833f6734a2a491b01e1666 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
This commit is contained in:
parent
6ff08b7db3
commit
b953e2f53f
@ -52,13 +52,10 @@ QFbWindow::QFbWindow(QWindow *window)
|
||||
{
|
||||
static QAtomicInt winIdGenerator(1);
|
||||
mWindowId = winIdGenerator.fetchAndAddRelaxed(1);
|
||||
|
||||
platformScreen()->addWindow(this);
|
||||
}
|
||||
|
||||
QFbWindow::~QFbWindow()
|
||||
{
|
||||
platformScreen()->removeWindow(this);
|
||||
}
|
||||
|
||||
QFbScreen *QFbWindow::platformScreen() const
|
||||
@ -86,6 +83,11 @@ void QFbWindow::setVisible(bool visible)
|
||||
setGeometry(platformScreen()->availableGeometry());
|
||||
}
|
||||
QPlatformWindow::setVisible(visible);
|
||||
|
||||
if (visible)
|
||||
platformScreen()->addWindow(this);
|
||||
else
|
||||
platformScreen()->removeWindow(this);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user