summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbwindow.h
diff options
context:
space:
mode:
authorSandro Mani <manisandro@gmail.com>2015-02-02 11:15:13 +0100
committerShawn Rutledge <shawn.rutledge@digia.com>2015-02-04 14:40:56 +0000
commitcf1c4d810a043ca5fe60623569c131a2a7a417df (patch)
tree248c058dc4c6e73c7a5cefdf585dd491a59fd5d8 /src/plugins/platforms/xcb/qxcbwindow.h
parent348ac43821ad3b0251d383d82fb02b8ab52ddbeb (diff)
QXcbWindow: use an accessor to get the screen instead of storing it
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>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbwindow.h')
-rw-r--r--src/plugins/platforms/xcb/qxcbwindow.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platforms/xcb/qxcbwindow.h b/src/plugins/platforms/xcb/qxcbwindow.h
index b78bf779d0..63fdb250da 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.h
+++ b/src/plugins/platforms/xcb/qxcbwindow.h
@@ -149,6 +149,8 @@ public:
qreal devicePixelRatio() const Q_DECL_OVERRIDE;
+ QXcbScreen *xcbScreen() const;
+
virtual void create();
virtual void destroy();
QPlatformScreen *screenForNativeGeometry(const QRect &newGeometry) const;
@@ -186,8 +188,6 @@ protected:
void doFocusIn();
void doFocusOut();
- QXcbScreen *m_screen;
-
xcb_window_t m_window;
uint m_depth;