Applications which construct a window with one screen configuration and show
the window later on after a screen configuration change crash because the
QXcbWindow::m_screen still pointed to the screen present at the time of window
construction. In QXcbWindow::handleConfigureNotifyEvent the m_screen should get
updated with the new screen, but I didn't see that method called in the
scenario outlined. Looking at the other platform backends, I however see that
they take the screen directly from the QPlatformWindow instead of storing the
instance, hence this patch which makes QXcbWindow do the same.
Change-Id: I13759a5939315c3aac36ec6e2c25bd0a6d7b1c35
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>