WinRT: Handle window exposure when visibility changes

Expose events should be sent to application windows when the main view
becomes visible (again). This fixes a blank screen which may occur when
resuming an app from suspend.

Change-Id: I33dc00482ef17cdc954a71626a8ad3cd24361a64
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
This commit is contained in:
Andrew Knight 2014-03-07 12:41:57 +02:00 committed by The Qt Project
parent 4c9d767f6e
commit 3a1c223a0a

View File

@ -984,6 +984,8 @@ HRESULT QWinRTScreen::onVisibilityChanged(ICoreWindow *window, IVisibilityChange
boolean visible;
args->get_Visible(&visible);
QWindowSystemInterface::handleApplicationStateChanged(visible ? Qt::ApplicationActive : Qt::ApplicationHidden);
if (visible)
handleExpose();
return S_OK;
}