Use QWindowSystemInterface::handleCloseEvent() to ask internal windows to close

This way, InternalWindow::closeWindow() better integrates with Qt.
wilder/Plasma/6.3
Vlad Zahorodnii 2 years ago
parent 23c7f5d474
commit 37d9af370b
  1. 4
      src/internalwindow.cpp

@ -18,6 +18,8 @@
#include <QMouseEvent>
#include <QWindow>
#include <qpa/qwindowsysteminterface.h>
Q_DECLARE_METATYPE(NET::WindowType)
static const QByteArray s_skipClosePropertyName = QByteArrayLiteral("KWIN_SKIP_CLOSE_ANIMATION");
@ -173,7 +175,7 @@ QString InternalWindow::windowRole() const
void InternalWindow::closeWindow()
{
if (!isDeleted()) {
m_handle->hide();
QWindowSystemInterface::handleCloseEvent<QWindowSystemInterface::AsynchronousDelivery>(m_handle);
}
}

Loading…
Cancel
Save