From 9694d754b815abdf302aba26bd1eada5768adb97 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 25 Feb 2019 15:01:56 +0100 Subject: Haiku: Fix mis-spelled module in .pro MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix warning: Project ERROR: Unknown module(s) in QT: eventdistpatcher_support-private Change-Id: Ic74481621c541fc0a13640c5e5cae2df44ffb091 Reviewed-by: Tor Arne Vestbø --- src/plugins/platforms/haiku/haiku.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/platforms') diff --git a/src/plugins/platforms/haiku/haiku.pro b/src/plugins/platforms/haiku/haiku.pro index fd1f47b963..e7702361ee 100644 --- a/src/plugins/platforms/haiku/haiku.pro +++ b/src/plugins/platforms/haiku/haiku.pro @@ -1,6 +1,6 @@ TARGET = qhaiku -QT += core-private gui-private eventdistpatcher_support-private +QT += core-private gui-private eventdispatcher_support-private SOURCES = \ main.cpp \ -- cgit v1.2.3 From 2c31516a1eb05597a5c7474448b7b413f5dc34c5 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 25 Feb 2019 15:58:22 +0100 Subject: Windows QPA: Fix override cursor when modal window is present Handle WM_SETCURSOR to apply override cursors to window that do not have mouse capture (as is done in Qt 4). Fixes: QTBUG-58590 Change-Id: I7ff6f799da1b8d4b4396c0a6137778a11a192617 Reviewed-by: Oliver Wolff Reviewed-by: Andre de la Rocha --- src/plugins/platforms/windows/qwindowscontext.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/plugins/platforms') diff --git a/src/plugins/platforms/windows/qwindowscontext.cpp b/src/plugins/platforms/windows/qwindowscontext.cpp index 41655dbd57..80517ffe69 100644 --- a/src/plugins/platforms/windows/qwindowscontext.cpp +++ b/src/plugins/platforms/windows/qwindowscontext.cpp @@ -1099,6 +1099,12 @@ bool QWindowsContext::windowsProc(HWND hwnd, UINT message, return false; case QtWindows::ClipboardEvent: return false; + case QtWindows::CursorEvent: // Sent to windows that do not have capture (see QTBUG-58590). + if (QWindowsCursor::hasOverrideCursor()) { + QWindowsCursor::enforceOverrideCursor(); + return true; + } + break; case QtWindows::UnknownEvent: return false; case QtWindows::AccessibleObjectFromWindowRequest: -- cgit v1.2.3 From ca991ee22d3509f8f54ee26d4c30d45319428c8f Mon Sep 17 00:00:00 2001 From: Elena Zaretskaya Date: Thu, 14 Feb 2019 09:49:33 -0500 Subject: Segfault when the exiting the application under platform eglfs If you run an application under eglfs, it falls with segfault on the exit. For example, examples/gui/analogclock, examples/widgets/widgets/analogclock, examples/opengl/cube, examples/opengl/qopenglwidget, etc. (I have added the function keyPressEvent to exit by qApp->quit(), if needed). It isn't appear in applications using QQuickView or QGLWindow. This is because QCoreApplication destructor, where the variable self = 0 (therefore, qGuiApp = 0), is called before than QOpenGLVertexArrayObject::destroy(), where qGuiApp is accessed (qGuiApp->thread()). Task-number: QTBUG-73824 Change-Id: I1dc55d5e811bfe8a8ea2178752e8771f8644d356 Reviewed-by: Laszlo Agocs --- src/plugins/platforms/eglfs/api/qeglfsscreen.cpp | 3 --- src/plugins/platforms/eglfs/api/qeglfswindow.cpp | 27 +++++++++++++++--------- src/plugins/platforms/eglfs/api/qeglfswindow_p.h | 1 + 3 files changed, 18 insertions(+), 13 deletions(-) (limited to 'src/plugins/platforms') diff --git a/src/plugins/platforms/eglfs/api/qeglfsscreen.cpp b/src/plugins/platforms/eglfs/api/qeglfsscreen.cpp index 285dbd93d3..11b68c0589 100644 --- a/src/plugins/platforms/eglfs/api/qeglfsscreen.cpp +++ b/src/plugins/platforms/eglfs/api/qeglfsscreen.cpp @@ -62,9 +62,6 @@ QEglFSScreen::QEglFSScreen(EGLDisplay dpy) QEglFSScreen::~QEglFSScreen() { delete m_cursor; -#ifndef QT_NO_OPENGL - QOpenGLCompositor::destroy(); -#endif } QRect QEglFSScreen::geometry() const diff --git a/src/plugins/platforms/eglfs/api/qeglfswindow.cpp b/src/plugins/platforms/eglfs/api/qeglfswindow.cpp index 29cfd4ea79..98e9ee4728 100644 --- a/src/plugins/platforms/eglfs/api/qeglfswindow.cpp +++ b/src/plugins/platforms/eglfs/api/qeglfswindow.cpp @@ -62,6 +62,7 @@ QEglFSWindow::QEglFSWindow(QWindow *w) : QPlatformWindow(w), #ifndef QT_NO_OPENGL m_backingStore(0), + m_rasterCompositingContext(0), #endif m_raster(false), m_winId(0), @@ -144,18 +145,18 @@ void QEglFSWindow::create() #ifndef QT_NO_OPENGL if (isRaster()) { - QOpenGLContext *context = new QOpenGLContext(QGuiApplication::instance()); - context->setShareContext(qt_gl_global_share_context()); - context->setFormat(m_format); - context->setScreen(window()->screen()); - if (Q_UNLIKELY(!context->create())) + m_rasterCompositingContext = new QOpenGLContext; + m_rasterCompositingContext->setShareContext(qt_gl_global_share_context()); + m_rasterCompositingContext->setFormat(m_format); + m_rasterCompositingContext->setScreen(window()->screen()); + if (Q_UNLIKELY(!m_rasterCompositingContext->create())) qFatal("EGLFS: Failed to create compositing context"); - compositor->setTarget(context, window(), screen->rawGeometry()); + compositor->setTarget(m_rasterCompositingContext, window(), screen->rawGeometry()); compositor->setRotation(qEnvironmentVariableIntValue("QT_QPA_EGLFS_ROTATION")); // If there is a "root" window into which raster and QOpenGLWidget content is // composited, all other contexts must share with its context. if (!qt_gl_global_share_context()) { - qt_gl_set_global_share_context(context); + qt_gl_set_global_share_context(m_rasterCompositingContext); // What we set up here is in effect equivalent to the application setting // AA_ShareOpenGLContexts. Set the attribute to be fully consistent. QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts); @@ -166,6 +167,10 @@ void QEglFSWindow::create() void QEglFSWindow::destroy() { +#ifndef QT_NO_OPENGL + QOpenGLCompositor::instance()->removeWindow(this); +#endif + QEglFSScreen *screen = this->screen(); if (m_flags.testFlag(HasNativeWindow)) { #ifndef QT_NO_OPENGL @@ -177,12 +182,14 @@ void QEglFSWindow::destroy() screen->setPrimarySurface(EGL_NO_SURFACE); invalidateSurface(); - } - m_flags = 0; #ifndef QT_NO_OPENGL - QOpenGLCompositor::instance()->removeWindow(this); + QOpenGLCompositor::destroy(); + delete m_rasterCompositingContext; #endif + } + + m_flags = 0; } void QEglFSWindow::invalidateSurface() diff --git a/src/plugins/platforms/eglfs/api/qeglfswindow_p.h b/src/plugins/platforms/eglfs/api/qeglfswindow_p.h index c61f04f569..b0091e2a62 100644 --- a/src/plugins/platforms/eglfs/api/qeglfswindow_p.h +++ b/src/plugins/platforms/eglfs/api/qeglfswindow_p.h @@ -116,6 +116,7 @@ public: protected: #ifndef QT_NO_OPENGL QOpenGLCompositorBackingStore *m_backingStore; + QOpenGLContext *m_rasterCompositingContext; #endif bool m_raster; WId m_winId; -- cgit v1.2.3