iOS: Don't claim that windows with zero width and/or height are exposed
When sending expose events to Qt, Qt will ask us if we're exposed, and we need to tell it that we're not, so that clients will not try to makeCurrent on a CA layer that has a zero width and/or height. Note that this only works because we flush expose events. Change-Id: Idfbe03a2f35681084061376a3c650a8da027fda4 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
This commit is contained in:
parent
ec03058fa5
commit
95822e28e2
@ -74,6 +74,8 @@ public:
|
||||
void handleContentOrientationChange(Qt::ScreenOrientation orientation);
|
||||
void setVisible(bool visible);
|
||||
|
||||
bool isExposed() const Q_DECL_OVERRIDE;
|
||||
|
||||
void raise() { raiseOrLower(true); }
|
||||
void lower() { raiseOrLower(false); }
|
||||
void requestActivateWindow();
|
||||
|
@ -579,6 +579,11 @@ void QIOSWindow::applyGeometry(const QRect &rect)
|
||||
[m_view layoutIfNeeded];
|
||||
}
|
||||
|
||||
bool QIOSWindow::isExposed() const
|
||||
{
|
||||
return window()->isVisible() && !window()->geometry().isEmpty();
|
||||
}
|
||||
|
||||
void QIOSWindow::setWindowState(Qt::WindowState state)
|
||||
{
|
||||
// Update the QWindow representation straight away, so that
|
||||
|
Loading…
Reference in New Issue
Block a user