From c8451104de9d5e92684aa2c545dcca1cc0c01ac4 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Wed, 3 Apr 2024 23:44:33 +0300 Subject: [PATCH] Client: Use QWindowSystemInterface::handleCloseEvent() to close xdg-toplevel QWindow::close() will close a window regardless whether it's blocked by a modal dialog. On the other hand, QWindowSystemInterface::handleCloseEvent() will do nothing if a close event is sent to an xdg-toplevel window with a modal dialog. Pick-to: 6.7 Change-Id: I5f18d38d4fdbb5748687ee3537035172df916de9 Reviewed-by: Kai Uwe Broulik Reviewed-by: David Redondo --- .../plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/platforms/wayland/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp b/src/plugins/platforms/wayland/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp index d338f7475ba..f6428b585e9 100644 --- a/src/plugins/platforms/wayland/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp +++ b/src/plugins/platforms/wayland/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp @@ -169,7 +169,7 @@ void QWaylandXdgSurface::Toplevel::xdg_toplevel_configure(int32_t width, int32_t void QWaylandXdgSurface::Toplevel::xdg_toplevel_close() { - m_xdgSurface->m_window->window()->close(); + QWindowSystemInterface::handleCloseEvent(m_xdgSurface->m_window->window()); } void QWaylandXdgSurface::Toplevel::requestWindowFlags(Qt::WindowFlags flags)