From 7451faab740ec6294159be60d8a713f5e8070c09 Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Tue, 30 Oct 2018 19:02:26 +0000 Subject: Client: Explicitly send expose window on first configure Before 88a0246a46c30e08e9730d16cf8739773447d058 we would always call QWaylandWindow::applyConfigure which in turn sends an expose event. Without that clients do not commit their initial buffer. This adds back the expose event on the first received configure. Fixes: QTBUG-71509 Change-Id: Ica39bb23245957948e1e1f75caf4f16f7b086ef7 Reviewed-by: Johan Helsing --- src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6.cpp | 1 + src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp | 1 + 2 files changed, 2 insertions(+) (limited to 'src') diff --git a/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6.cpp b/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6.cpp index 3d3af6929..c055cbb1f 100644 --- a/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6.cpp +++ b/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6.cpp @@ -342,6 +342,7 @@ void QWaylandXdgSurfaceV6::zxdg_surface_v6_configure(uint32_t serial) if (!m_configured) { // We have to do the initial applyConfigure() immediately, since that is the expose. applyConfigure(); + m_exposeRegion = QRegion(QRect(QPoint(), m_window->geometry().size())); } else { // Later configures are probably resizes, so we have to queue them up for a time when we // are not painting to the window. diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp index c723192c8..014b6bed5 100644 --- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp +++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp @@ -376,6 +376,7 @@ void QWaylandXdgSurface::xdg_surface_configure(uint32_t serial) if (!m_configured) { // We have to do the initial applyConfigure() immediately, since that is the expose. applyConfigure(); + m_exposeRegion = QRegion(QRect(QPoint(), m_window->geometry().size())); } else { // Later configures are probably resizes, so we have to queue them up for a time when we // are not painting to the window. -- cgit v1.2.3 From 88eb34213b35bfac292397e784ac20341f216ab4 Mon Sep 17 00:00:00 2001 From: Paul Olav Tvete Date: Wed, 7 Nov 2018 11:23:44 +0100 Subject: Only print deprecation warning when using deprecated shells Avoids printing deprecation warnings for shells that are available by default but not actually used. In particular, avoids warning about wl-shell when using ivi-shell. Change-Id: Id075e97572e6ec876ad24f369808c61a479e9b07 Reviewed-by: Johan Helsing --- .../shellintegration/wl-shell/qwaylandwlshellintegration.cpp | 8 ++++---- .../xdg-shell-v5/qwaylandxdgshellv5integration.cpp | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/plugins/shellintegration/wl-shell/qwaylandwlshellintegration.cpp b/src/plugins/shellintegration/wl-shell/qwaylandwlshellintegration.cpp index 008da3d8a..1edb24b3c 100644 --- a/src/plugins/shellintegration/wl-shell/qwaylandwlshellintegration.cpp +++ b/src/plugins/shellintegration/wl-shell/qwaylandwlshellintegration.cpp @@ -49,10 +49,6 @@ namespace QtWaylandClient { bool QWaylandWlShellIntegration::initialize(QWaylandDisplay *display) { - qCWarning(lcQpaWayland) << "\"wl-shell\" is a deprecated shell extension, prefer using" - << "\"xdg-shell-v6\" or \"xdg-shell\" if supported by the compositor" - << "by setting the environment variable QT_WAYLAND_SHELL_INTEGRATION"; - Q_FOREACH (QWaylandDisplay::RegistryGlobal global, display->globals()) { if (global.interface == QLatin1String("wl_shell")) { m_wlShell = new QtWayland::wl_shell(display->wl_registry(), global.id, 1); @@ -65,6 +61,10 @@ bool QWaylandWlShellIntegration::initialize(QWaylandDisplay *display) return false; } + qCWarning(lcQpaWayland) << "\"wl-shell\" is a deprecated shell extension, prefer using" + << "\"xdg-shell-v6\" or \"xdg-shell\" if supported by the compositor" + << "by setting the environment variable QT_WAYLAND_SHELL_INTEGRATION"; + return QWaylandShellIntegration::initialize(display); } diff --git a/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgshellv5integration.cpp b/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgshellv5integration.cpp index d032002b1..12cc95b15 100644 --- a/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgshellv5integration.cpp +++ b/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgshellv5integration.cpp @@ -51,10 +51,6 @@ namespace QtWaylandClient { bool QWaylandXdgShellV5Integration::initialize(QWaylandDisplay *display) { - qCWarning(lcQpaWayland) << "\"xdg-shell-v5\" is a deprecated shell extension, prefer using" - << "\"xdg-shell-v6\" or \"xdg-shell\" if supported by the compositor" - << "by setting the environment variable QT_WAYLAND_SHELL_INTEGRATION"; - Q_FOREACH (QWaylandDisplay::RegistryGlobal global, display->globals()) { if (global.interface == QLatin1String("xdg_shell")) { m_xdgShell.reset(new QWaylandXdgShellV5(display->wl_registry(), global.id)); @@ -67,6 +63,10 @@ bool QWaylandXdgShellV5Integration::initialize(QWaylandDisplay *display) return false; } + qCWarning(lcQpaWayland) << "\"xdg-shell-v5\" is a deprecated shell extension, prefer using" + << "\"xdg-shell-v6\" or \"xdg-shell\" if supported by the compositor" + << "by setting the environment variable QT_WAYLAND_SHELL_INTEGRATION"; + return QWaylandShellIntegration::initialize(display); } -- cgit v1.2.3 From f890798053c7fa692bff7f8a3e96583dfcaba0cb Mon Sep 17 00:00:00 2001 From: Paul Olav Tvete Date: Wed, 7 Nov 2018 14:19:04 +0100 Subject: Don't crash if view is deleted from surfaceDestroyed signal Fix regression introduced in 297bcd005c4205f69e1bf9e9dc565ab757cf0bac Fixes: QTBUG-71643 Change-Id: I769518a9ca13fcd13ea277c7fa8ac1885ca123ba Reviewed-by: Johan Helsing --- src/compositor/compositor_api/qwaylandview.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/compositor/compositor_api/qwaylandview.cpp b/src/compositor/compositor_api/qwaylandview.cpp index 127593770..1a6bf1a64 100644 --- a/src/compositor/compositor_api/qwaylandview.cpp +++ b/src/compositor/compositor_api/qwaylandview.cpp @@ -56,8 +56,10 @@ void QWaylandViewPrivate::markSurfaceAsDestroyed(QWaylandSurface *surface) Q_ASSERT(surface == this->surface); setSurface(nullptr); + QPointer deleteGuard(q); emit q->surfaceDestroyed(); - clearFrontBuffer(); + if (!deleteGuard.isNull()) + clearFrontBuffer(); } /*! -- cgit v1.2.3