summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/eglfs/qeglfswindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/eglfs/qeglfswindow.cpp')
-rw-r--r--src/plugins/platforms/eglfs/qeglfswindow.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/plugins/platforms/eglfs/qeglfswindow.cpp b/src/plugins/platforms/eglfs/qeglfswindow.cpp
index f5839e086d..59c2014d66 100644
--- a/src/plugins/platforms/eglfs/qeglfswindow.cpp
+++ b/src/plugins/platforms/eglfs/qeglfswindow.cpp
@@ -116,7 +116,7 @@ void QEglFSWindow::destroy()
{
QEglFSScreen *screen = this->screen();
if (m_flags.testFlag(HasNativeWindow)) {
- QEGLPlatformCursor *cursor = static_cast<QEGLPlatformCursor *>(screen->cursor());
+ QEGLPlatformCursor *cursor = qobject_cast<QEGLPlatformCursor *>(screen->cursor());
if (cursor)
cursor->resetResources();
@@ -147,8 +147,9 @@ void QEglFSWindow::invalidateSurface()
void QEglFSWindow::resetSurface()
{
- EGLDisplay display = static_cast<QEglFSScreen *>(screen())->display();
- m_window = QEglFSHooks::hooks()->createNativeWindow(this, QEglFSHooks::hooks()->screenSize(), m_format);
+ QEglFSScreen *nativeScreen = static_cast<QEglFSScreen *>(screen());
+ EGLDisplay display = nativeScreen->display();
+ m_window = QEglFSHooks::hooks()->createNativeWindow(this, nativeScreen->geometry().size(), m_format);
m_surface = eglCreateWindowSurface(display, m_config, m_window, NULL);
if (m_surface == EGL_NO_SURFACE) {
EGLint error = eglGetError();