summaryrefslogtreecommitdiffstats
path: root/src/hardwareintegration/client
diff options
context:
space:
mode:
Diffstat (limited to 'src/hardwareintegration/client')
-rw-r--r--src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp8
-rw-r--r--src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp22
-rw-r--r--src/hardwareintegration/client/xcomposite_share/xcomposite_share.pri2
3 files changed, 14 insertions, 18 deletions
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp
index f10a7469a..24dadff4d 100644
--- a/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp
@@ -126,8 +126,12 @@ void QWaylandEglWindow::updateSurface(bool create)
} else {
if (m_waylandEglWindow) {
int current_width, current_height;
- wl_egl_window_get_attached_size(m_waylandEglWindow,&current_width,&current_height);
- if (current_width != sizeWithMargins.width() || current_height != sizeWithMargins.height()) {
+ static bool disableResizeCheck = qgetenv("QT_WAYLAND_DISABLE_RESIZECHECK").toInt();
+
+ if (!disableResizeCheck) {
+ wl_egl_window_get_attached_size(m_waylandEglWindow, &current_width, &current_height);
+ }
+ if (disableResizeCheck || (current_width != sizeWithMargins.width() || current_height != sizeWithMargins.height())) {
wl_egl_window_resize(m_waylandEglWindow, sizeWithMargins.width(), sizeWithMargins.height(), mOffset.x(), mOffset.y());
mOffset = QPoint();
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
index e58403ad0..0cbbe5389 100644
--- a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
@@ -315,7 +315,9 @@ QWaylandGLContext::QWaylandGLContext(EGLDisplay eglDisplay, QWaylandDisplay *dis
mSupportNonBlockingSwap = false;
}
if (!mSupportNonBlockingSwap) {
- qWarning() << "Non-blocking swap buffers not supported. Subsurface rendering can be affected.";
+ qWarning(lcQpaWayland) << "Non-blocking swap buffers not supported."
+ << "Subsurface rendering can be affected."
+ << "It may also cause the event loop to freeze in some situations";
}
updateGLFormat();
@@ -550,20 +552,10 @@ void QWaylandGLContext::swapBuffers(QPlatformSurface *surface)
m_blitter->blit(window);
}
-
- QWaylandSubSurface *sub = window->subSurfaceWindow();
- if (sub) {
- QMutexLocker l(sub->syncMutex());
-
- int si = (sub->isSync() && mSupportNonBlockingSwap) ? 0 : m_format.swapInterval();
-
- eglSwapInterval(m_eglDisplay, si);
- eglSwapBuffers(m_eglDisplay, eglSurface);
- } else {
- eglSwapInterval(m_eglDisplay, m_format.swapInterval());
- eglSwapBuffers(m_eglDisplay, eglSurface);
- }
-
+ window->handleUpdate();
+ int swapInterval = mSupportNonBlockingSwap ? 0 : m_format.swapInterval();
+ eglSwapInterval(m_eglDisplay, swapInterval);
+ eglSwapBuffers(m_eglDisplay, eglSurface);
window->setCanResize(true);
}
diff --git a/src/hardwareintegration/client/xcomposite_share/xcomposite_share.pri b/src/hardwareintegration/client/xcomposite_share/xcomposite_share.pri
index a9120c261..d2b129d03 100644
--- a/src/hardwareintegration/client/xcomposite_share/xcomposite_share.pri
+++ b/src/hardwareintegration/client/xcomposite_share/xcomposite_share.pri
@@ -1,6 +1,6 @@
INCLUDEPATH += $$PWD
-QMAKE_USE += xcomposite
+QMAKE_USE += xcomposite x11
CONFIG += wayland-scanner-client-wayland-protocol-include
WAYLANDCLIENTSOURCES += $$PWD/../../../extensions/xcomposite.xml