qpa: Mark window exposed after it's marked visible
This fixes tabbox crash that happens when using the software renderer.
The QSGSoftwareRenderLoop is going to create a backing store after seeing that the window is shown. If it receives an expose event, it is going to render the window immediately.
QWindow::setVisible() works as follows:
- Toggle QWindow::isVisible()
- Send a QEvent::Show event
- Do some other window-y things
- Call QPlatformWindow::setVisible()
Plasma::Dialog watches the show event and manipulates the geometry after receiving such an event. When it does so, it's still too early to send an expose event. We can update the geometry but the expose event cannot be still sent yet.
This change aligns the exposed state with QPlatformWindow::setVisible() to ensure that no expose event is sent too early. It roughly matches what QtWayland does.
SENTRY: KWIN-949
Edited by Vlad Zahorodnii