Tidy Window::windowClosed() signal

"window" is redundant, so remove it. Also remove the original window
argument to improve the API consistency.
This commit is contained in:
Vlad Zahorodnii 2023-03-13 21:21:11 +02:00
parent 01cfa5e484
commit c91b90c58a
52 changed files with 96 additions and 97 deletions

View file

@ -127,7 +127,7 @@ void ActivitiesTest::testSetOnActivitiesValidates()
xcb_flush(c.get());
c.reset();
QSignalSpy windowClosedSpy(window, &X11Window::windowClosed);
QSignalSpy windowClosedSpy(window, &X11Window::closed);
QVERIFY(windowClosedSpy.wait());
}

View file

@ -205,7 +205,7 @@ void TestDbusInterface::testGetWindowInfoXdgShellClient()
// finally close window
const auto id = window->internalId();
QSignalSpy windowClosedSpy(window, &Window::windowClosed);
QSignalSpy windowClosedSpy(window, &Window::closed);
shellSurface.reset();
surface.reset();
QVERIFY(windowClosedSpy.wait());
@ -363,7 +363,7 @@ void TestDbusInterface::testGetWindowInfoX11Client()
xcb_unmap_window(c.get(), windowId);
xcb_flush(c.get());
QSignalSpy windowClosedSpy(window, &X11Window::windowClosed);
QSignalSpy windowClosedSpy(window, &X11Window::closed);
QVERIFY(windowClosedSpy.wait());
xcb_destroy_window(c.get(), windowId);
c.reset();

View file

@ -142,7 +142,7 @@ void X11DesktopWindowTest::testDesktopWindow()
xcb_flush(c.get());
c.reset();
QSignalSpy windowClosedSpy(window, &X11Window::windowClosed);
QSignalSpy windowClosedSpy(window, &X11Window::closed);
QVERIFY(windowClosedSpy.wait());
}

View file

@ -128,7 +128,7 @@ void DontCrashAuroraeDestroyDecoTest::testBorderlessMaximizedWindows()
xcb_destroy_window(c, windowId);
xcb_flush(c);
QSignalSpy windowClosedSpy(window, &X11Window::windowClosed);
QSignalSpy windowClosedSpy(window, &X11Window::closed);
QVERIFY(windowClosedSpy.wait());
}

View file

@ -92,7 +92,7 @@ void DontCrashCancelAnimationFromAnimationEndedTest::testScript()
QTest::qWait(200);
// wait for the window to be passed to Deleted
QSignalSpy windowDeletedSpy(window, &Window::windowClosed);
QSignalSpy windowDeletedSpy(window, &Window::closed);
surface.reset();

View file

@ -97,7 +97,7 @@ void DontCrashEmptyDecorationTest::testBug361551()
xcb_destroy_window(c, windowId);
xcb_flush(c);
QSignalSpy windowClosedSpy(window, &X11Window::windowClosed);
QSignalSpy windowClosedSpy(window, &X11Window::closed);
QVERIFY(windowClosedSpy.wait());
}

View file

@ -56,7 +56,7 @@ void DontCrashGlxgearsTest::testGlxgears()
QCOMPARE(workspace()->clientList().count(), 1);
X11Window *glxgearsWindow = workspace()->clientList().first();
QVERIFY(glxgearsWindow->isDecorated());
QSignalSpy closedSpy(glxgearsWindow, &X11Window::windowClosed);
QSignalSpy closedSpy(glxgearsWindow, &X11Window::closed);
KDecoration2::Decoration *decoration = glxgearsWindow->decoration();
QVERIFY(decoration);

View file

@ -123,7 +123,7 @@ void DontCrashReinitializeCompositorTest::testReinitializeCompositor()
QVERIFY(!effect->isActive());
// Close the test window.
QSignalSpy windowClosedSpy(window, &Window::windowClosed);
QSignalSpy windowClosedSpy(window, &Window::closed);
shellSurface.reset();
surface.reset();
QVERIFY(windowClosedSpy.wait());

View file

@ -128,7 +128,7 @@ void PopupOpenCloseAnimationTest::testAnimatePopups()
QTRY_VERIFY(!effect->isActive());
// Destroy the popup, it should not be animated.
QSignalSpy popupClosedSpy(popup, &Window::windowClosed);
QSignalSpy popupClosedSpy(popup, &Window::closed);
popupShellSurface.reset();
popupSurface.reset();
QVERIFY(popupClosedSpy.wait());
@ -243,7 +243,7 @@ void PopupOpenCloseAnimationTest::testAnimateDecorationTooltips()
QTRY_VERIFY(!effect->isActive());
// Hide the decoration tooltip.
QSignalSpy tooltipClosedSpy(tooltip, &InternalWindow::windowClosed);
QSignalSpy tooltipClosedSpy(tooltip, &InternalWindow::closed);
window->decoratedClient()->requestHideToolTip();
QVERIFY(tooltipClosedSpy.wait());
QVERIFY(effect->isActive());

View file

@ -202,10 +202,10 @@ void SlidingPopupsTest::testWithOtherEffect()
xcb_unmap_window(c.get(), windowId);
xcb_flush(c.get());
QSignalSpy windowClosedSpy(window, &X11Window::windowClosed);
QSignalSpy closedSpy(window, &X11Window::closed);
QSignalSpy windowDeletedSpy(effects, &EffectsHandler::windowDeleted);
QVERIFY(windowClosedSpy.wait());
QVERIFY(closedSpy.wait());
// again we should have the sliding popups active
QVERIFY(slidingPoupus->isActive());
@ -313,7 +313,7 @@ void SlidingPopupsTest::testWithOtherEffectWayland()
shellSurface.reset();
surface.reset();
QSignalSpy windowClosedSpy(window, &X11Window::windowClosed);
QSignalSpy windowClosedSpy(window, &X11Window::closed);
QSignalSpy windowDeletedSpy(effects, &EffectsHandler::windowDeleted);
QVERIFY(windowClosedSpy.wait());

View file

@ -122,7 +122,7 @@ void ToplevelOpenCloseAnimationTest::testAnimateToplevels()
// Close the test window, the effect should start animating the disappearing
// of the window.
QSignalSpy windowClosedSpy(window, &Window::windowClosed);
QSignalSpy windowClosedSpy(window, &Window::closed);
shellSurface.reset();
surface.reset();
QVERIFY(windowClosedSpy.wait());
@ -185,7 +185,7 @@ void ToplevelOpenCloseAnimationTest::testDontAnimatePopups()
QVERIFY(!effect->isActive());
// Destroy the popup, it should not be animated.
QSignalSpy popupClosedSpy(popup, &Window::windowClosed);
QSignalSpy popupClosedSpy(popup, &Window::closed);
popupShellSurface.reset();
popupSurface.reset();
QVERIFY(popupClosedSpy.wait());

View file

@ -155,7 +155,7 @@ void TranslucencyTest::testMoveAfterDesktopChange()
xcb_unmap_window(c.get(), windowId);
xcb_flush(c.get());
QSignalSpy windowClosedSpy(window, &X11Window::windowClosed);
QSignalSpy windowClosedSpy(window, &X11Window::closed);
QVERIFY(windowClosedSpy.wait());
xcb_destroy_window(c.get(), windowId);
c.reset();
@ -204,7 +204,7 @@ void TranslucencyTest::testDialogClose()
xcb_unmap_window(c.get(), windowId);
xcb_flush(c.get());
QSignalSpy windowClosedSpy(window, &X11Window::windowClosed);
QSignalSpy windowClosedSpy(window, &X11Window::closed);
QSignalSpy windowDeletedSpy(effects, &EffectsHandler::windowDeleted);
QVERIFY(windowClosedSpy.wait());

View file

@ -334,7 +334,7 @@ void GlobalShortcutsTest::testX11WindowShortcut()
Test::keyboardKeyReleased(KEY_LEFTMETA, timestamp++);
// destroy window again
QSignalSpy windowClosedSpy(window, &X11Window::windowClosed);
QSignalSpy windowClosedSpy(window, &X11Window::closed);
xcb_unmap_window(c.get(), windowId);
xcb_destroy_window(c.get(), windowId);
xcb_flush(c.get());

View file

@ -141,7 +141,7 @@ void InputStackingOrderTest::testPointerFocusUpdatesOnStackingOrderChange()
QCOMPARE(waylandServer()->seat()->focusedPointerSurface(), window1->surface());
// let's destroy window1, that should pass focus to window2 again
QSignalSpy windowClosedSpy(window1, &Window::windowClosed);
QSignalSpy windowClosedSpy(window1, &Window::closed);
surface1.reset();
QVERIFY(windowClosedSpy.wait());
QVERIFY(enteredSpy.wait());

View file

@ -801,7 +801,7 @@ void InternalWindowTest::testDismissPopup()
QVERIFY(serverOtherToplevel);
// Click somewhere outside the popup window.
QSignalSpy popupClosedSpy(serverPopup, &InternalWindow::windowClosed);
QSignalSpy popupClosedSpy(serverPopup, &InternalWindow::closed);
quint32 timestamp = 0;
Test::pointerMotion(serverOtherToplevel->frameGeometry().center(), timestamp++);
Test::pointerButtonPressed(BTN_LEFT, timestamp++);

View file

@ -653,7 +653,7 @@ void MoveResizeWindowTest::testNetMove()
xcb_flush(c.get());
c.reset();
QSignalSpy windowClosedSpy(window, &X11Window::windowClosed);
QSignalSpy windowClosedSpy(window, &X11Window::closed);
QVERIFY(windowClosedSpy.wait());
}
@ -732,14 +732,14 @@ void MoveResizeWindowTest::testAdjustClientGeometryOfAutohidingX11Panel()
xcb_flush(c.get());
c.reset();
QSignalSpy panelClosedSpy(panel, &X11Window::windowClosed);
QSignalSpy panelClosedSpy(panel, &X11Window::closed);
QVERIFY(panelClosedSpy.wait());
// snap once more
QCOMPARE(Workspace::self()->adjustWindowPosition(testWindow, targetPoint, false), targetPoint);
// and close
QSignalSpy windowClosedSpy(testWindow, &Window::windowClosed);
QSignalSpy windowClosedSpy(testWindow, &Window::closed);
shellSurface.reset();
surface.reset();
QVERIFY(windowClosedSpy.wait());
@ -802,7 +802,7 @@ void MoveResizeWindowTest::testAdjustClientGeometryOfAutohidingWaylandPanel()
QCOMPARE(Workspace::self()->adjustWindowPosition(testWindow, targetPoint, false), targetPoint);
// and destroy the panel again
QSignalSpy panelClosedSpy(panel, &Window::windowClosed);
QSignalSpy panelClosedSpy(panel, &Window::closed);
plasmaSurface.reset();
panelShellSurface.reset();
panelSurface.reset();
@ -812,7 +812,7 @@ void MoveResizeWindowTest::testAdjustClientGeometryOfAutohidingWaylandPanel()
QCOMPARE(Workspace::self()->adjustWindowPosition(testWindow, targetPoint, false), targetPoint);
// and close
QSignalSpy windowClosedSpy(testWindow, &Window::windowClosed);
QSignalSpy windowClosedSpy(testWindow, &Window::closed);
shellSurface.reset();
surface.reset();
QVERIFY(windowClosedSpy.wait());

View file

@ -157,7 +157,7 @@ void PlasmaWindowTest::testCreateDestroyX11PlasmaWindow()
xcb_unmap_window(c.get(), windowId);
xcb_flush(c.get());
QSignalSpy windowClosedSpy(window, &X11Window::windowClosed);
QSignalSpy windowClosedSpy(window, &X11Window::closed);
QVERIFY(windowClosedSpy.wait());
xcb_destroy_window(c.get(), windowId);
c.reset();

View file

@ -583,7 +583,7 @@ void QuickTilingTest::testX11QuickTiling()
xcb_flush(c.get());
c.reset();
QSignalSpy windowClosedSpy(window, &X11Window::windowClosed);
QSignalSpy windowClosedSpy(window, &X11Window::closed);
QVERIFY(windowClosedSpy.wait());
}
@ -659,7 +659,7 @@ void QuickTilingTest::testX11QuickTilingAfterVertMaximize()
xcb_flush(c.get());
c.reset();
QSignalSpy windowClosedSpy(window, &X11Window::windowClosed);
QSignalSpy windowClosedSpy(window, &X11Window::closed);
QVERIFY(windowClosedSpy.wait());
}

View file

@ -159,7 +159,7 @@ void ScreenEdgeClientShowTest::testScreenEdgeShowHideX11()
QVERIFY(window->isHiddenInternal());
// destroy window again
QSignalSpy windowClosedSpy(window, &X11Window::windowClosed);
QSignalSpy windowClosedSpy(window, &X11Window::closed);
xcb_unmap_window(c.get(), windowId);
xcb_destroy_window(c.get(), windowId);
xcb_flush(c.get());
@ -246,7 +246,7 @@ void ScreenEdgeClientShowTest::testScreenEdgeShowX11Touch()
QCOMPARE(effectsWindowShownSpy.count(), 1);
// destroy window again
QSignalSpy windowClosedSpy(window, &X11Window::windowClosed);
QSignalSpy windowClosedSpy(window, &X11Window::closed);
xcb_unmap_window(c.get(), windowId);
xcb_destroy_window(c.get(), windowId);
xcb_flush(c.get());

View file

@ -110,7 +110,7 @@ void ShadeTest::testShadeGeometry()
xcb_flush(c.get());
c.reset();
QSignalSpy windowClosedSpy(window, &X11Window::windowClosed);
QSignalSpy windowClosedSpy(window, &X11Window::closed);
QVERIFY(windowClosedSpy.wait());
}

View file

@ -241,17 +241,17 @@ void StackingOrderTest::testDeletedTransient()
QTRY_VERIFY(!transient2->isActive());
// Close the top-most transient.
connect(transient2, &Window::windowClosed, this, [](Window *original, Window *deleted) {
connect(transient2, &Window::closed, this, [](Window *deleted) {
deleted->ref();
});
QSignalSpy windowClosedSpy(transient2, &Window::windowClosed);
QSignalSpy windowClosedSpy(transient2, &Window::closed);
delete transient2ShellSurface;
transient2Surface.reset();
QVERIFY(windowClosedSpy.wait());
std::unique_ptr<Window, WindowUnrefDeleter> deletedTransient(
windowClosedSpy.first().at(1).value<Window *>());
windowClosedSpy.first().at(0).value<Window *>());
QVERIFY(deletedTransient.get());
// The deleted transient still has to be above its old parent (transient1).
@ -644,17 +644,17 @@ void StackingOrderTest::testDeletedGroupTransient()
QCOMPARE(workspace()->stackingOrder(), (QList<Window *>{leader, member1, member2, transient}));
// Unmap the transient.
connect(transient, &X11Window::windowClosed, this, [](Window *original, Window *deleted) {
connect(transient, &X11Window::closed, this, [](Window *deleted) {
deleted->ref();
});
QSignalSpy windowClosedSpy(transient, &X11Window::windowClosed);
QSignalSpy windowClosedSpy(transient, &X11Window::closed);
xcb_unmap_window(conn.get(), transientWid);
xcb_flush(conn.get());
QVERIFY(windowClosedSpy.wait());
std::unique_ptr<Window, WindowUnrefDeleter> deletedTransient(
windowClosedSpy.first().at(1).value<Window *>());
windowClosedSpy.first().at(0).value<Window *>());
QVERIFY(deletedTransient.get());
// The transient has to be above each member of the window group.

View file

@ -639,7 +639,7 @@ void StrutsTest::testX11Struts()
xcb_flush(c.get());
c.reset();
QSignalSpy windowClosedSpy(window, &X11Window::windowClosed);
QSignalSpy windowClosedSpy(window, &X11Window::closed);
QVERIFY(windowClosedSpy.wait());
// now struts should be removed again
@ -737,7 +737,7 @@ void StrutsTest::test363804()
xcb_flush(c.get());
c.reset();
QSignalSpy windowClosedSpy(window, &X11Window::windowClosed);
QSignalSpy windowClosedSpy(window, &X11Window::closed);
QVERIFY(windowClosedSpy.wait());
}
@ -837,7 +837,7 @@ void StrutsTest::testLeftScreenSmallerBottomAligned()
QCOMPARE(window2->frameGeometry(), QRect(0, 306, 1366, 744));
QCOMPARE(window2->maximizeMode(), KWin::MaximizeFull);
// destroy window again
QSignalSpy normalWindowClosedSpy(window2, &X11Window::windowClosed);
QSignalSpy normalWindowClosedSpy(window2, &X11Window::closed);
xcb_unmap_window(c.get(), w2);
xcb_destroy_window(c.get(), w2);
xcb_flush(c.get());
@ -849,7 +849,7 @@ void StrutsTest::testLeftScreenSmallerBottomAligned()
xcb_flush(c.get());
c.reset();
QSignalSpy windowClosedSpy(window, &X11Window::windowClosed);
QSignalSpy windowClosedSpy(window, &X11Window::closed);
QVERIFY(windowClosedSpy.wait());
}

View file

@ -124,7 +124,7 @@ void WindowRuleTest::testApplyInitialMaximizeVert()
QCOMPARE(window->maximizeMode(), MaximizeVertical);
// destroy window again
QSignalSpy windowClosedSpy(window, &X11Window::windowClosed);
QSignalSpy windowClosedSpy(window, &X11Window::closed);
xcb_unmap_window(c.get(), windowId);
xcb_destroy_window(c.get(), windowId);
xcb_flush(c.get());
@ -194,7 +194,7 @@ void WindowRuleTest::testWindowClassChange()
QCOMPARE(window->keepAbove(), true);
// destroy window
QSignalSpy windowClosedSpy(window, &X11Window::windowClosed);
QSignalSpy windowClosedSpy(window, &X11Window::closed);
xcb_unmap_window(c.get(), windowId);
xcb_destroy_window(c.get(), windowId);
xcb_flush(c.get());

View file

@ -181,7 +181,7 @@ void X11WindowTest::testMinimumSize()
QVERIFY(!window->isInteractiveResize());
// Destroy the window.
QSignalSpy windowClosedSpy(window, &X11Window::windowClosed);
QSignalSpy windowClosedSpy(window, &X11Window::closed);
xcb_unmap_window(c.get(), windowId);
xcb_destroy_window(c.get(), windowId);
xcb_flush(c.get());
@ -286,7 +286,7 @@ void X11WindowTest::testMaximumSize()
QVERIFY(!window->isInteractiveResize());
// Destroy the window.
QSignalSpy windowClosedSpy(window, &X11Window::windowClosed);
QSignalSpy windowClosedSpy(window, &X11Window::closed);
xcb_unmap_window(c.get(), windowId);
xcb_destroy_window(c.get(), windowId);
xcb_flush(c.get());
@ -371,7 +371,7 @@ void X11WindowTest::testResizeIncrements()
QVERIFY(!window->isInteractiveResize());
// Destroy the window.
QSignalSpy windowClosedSpy(window, &X11Window::windowClosed);
QSignalSpy windowClosedSpy(window, &X11Window::closed);
xcb_unmap_window(c.get(), windowId);
xcb_destroy_window(c.get(), windowId);
xcb_flush(c.get());
@ -455,7 +455,7 @@ void X11WindowTest::testResizeIncrementsNoBaseSize()
QVERIFY(!window->isInteractiveResize());
// Destroy the window.
QSignalSpy windowClosedSpy(window, &X11Window::windowClosed);
QSignalSpy windowClosedSpy(window, &X11Window::closed);
xcb_unmap_window(c.get(), windowId);
xcb_destroy_window(c.get(), windowId);
xcb_flush(c.get());
@ -522,7 +522,7 @@ void X11WindowTest::testTrimCaption()
xcb_unmap_window(c.get(), windowId);
xcb_flush(c.get());
QSignalSpy windowClosedSpy(window, &X11Window::windowClosed);
QSignalSpy windowClosedSpy(window, &X11Window::closed);
QVERIFY(windowClosedSpy.wait());
xcb_destroy_window(c.get(), windowId);
c.reset();
@ -747,7 +747,7 @@ void X11WindowTest::testX11WindowId()
QUuid deletedUuid;
QCOMPARE(deletedUuid.isNull(), true);
connect(window, &X11Window::windowClosed, this, [&deletedUuid](Window *, Window *d) {
connect(window, &X11Window::closed, this, [&deletedUuid](Window *d) {
deletedUuid = d->internalId();
});
@ -777,7 +777,7 @@ void X11WindowTest::testX11WindowId()
// and destroy the window again
xcb_unmap_window(c.get(), windowId);
xcb_flush(c.get());
QSignalSpy windowClosedSpy(window, &X11Window::windowClosed);
QSignalSpy windowClosedSpy(window, &X11Window::closed);
QVERIFY(windowClosedSpy.wait());
QCOMPARE(deletedUuid.isNull(), false);
@ -826,7 +826,7 @@ void X11WindowTest::testCaptionChanges()
QCOMPARE(window->caption(), QStringLiteral("bar"));
// and destroy the window again
QSignalSpy windowClosedSpy(window, &X11Window::windowClosed);
QSignalSpy windowClosedSpy(window, &X11Window::closed);
xcb_unmap_window(c.get(), windowId);
xcb_flush(c.get());
QVERIFY(windowClosedSpy.wait());

View file

@ -174,7 +174,7 @@ void XWaylandInputTest::testPointerEnterLeaveSsd()
QCOMPARE(leftSpy.last().first().toPoint(), (window->frameGeometry().center() - QPointF(window->frameMargins().left(), window->frameMargins().top())).toPoint());
// destroy window again
QSignalSpy windowClosedSpy(window, &X11Window::windowClosed);
QSignalSpy windowClosedSpy(window, &X11Window::closed);
xcb_unmap_window(c.get(), windowId);
xcb_destroy_window(c.get(), windowId);
xcb_flush(c.get());
@ -263,7 +263,7 @@ void XWaylandInputTest::testPointerEventLeaveCsd()
QCOMPARE(leftSpy.last().first().toPoint(), QPoint(60, 105));
// Destroy the window.
QSignalSpy windowClosedSpy(window, &X11Window::windowClosed);
QSignalSpy windowClosedSpy(window, &X11Window::closed);
xcb_unmap_window(c.get(), windowId);
xcb_destroy_window(c.get(), windowId);
xcb_flush(c.get());

View file

@ -77,7 +77,7 @@ void Deleted::copyToDeleted(Window *window)
}
m_mainWindows = window->mainWindows();
for (Window *w : std::as_const(m_mainWindows)) {
connect(w, &Window::windowClosed, this, &Deleted::mainWindowClosed);
connect(w, &Window::closed, this, &Deleted::mainWindowClosed);
}
m_fullscreen = window->isFullScreen();
m_caption = window->caption();

View file

@ -282,7 +282,9 @@ void EffectsHandlerImpl::unloadAllEffects()
void EffectsHandlerImpl::setupWindowConnections(Window *window)
{
connect(window, &Window::windowClosed, this, &EffectsHandlerImpl::slotWindowClosed);
connect(window, &Window::closed, this, [this, window](Window *deleted) {
slotWindowClosed(window, deleted);
});
connect(window, &Window::maximizedChanged, this, [this, window]() {
if (EffectWindowImpl *w = window->effectWindow()) {
const MaximizeMode mode = window->maximizeMode();
@ -362,7 +364,9 @@ void EffectsHandlerImpl::setupWindowConnections(Window *window)
void EffectsHandlerImpl::setupUnmanagedConnections(Unmanaged *u)
{
connect(u, &Unmanaged::windowClosed, this, &EffectsHandlerImpl::slotWindowClosed);
connect(u, &Window::closed, this, [this, u](Window *deleted) {
slotWindowClosed(u, deleted);
});
connect(u, &Unmanaged::opacityChanged, this, &EffectsHandlerImpl::slotOpacityChanged);
connect(u, &Unmanaged::geometryShapeChanged, this, [this, u](const QRectF &old) {
// during late cleanup effectWindow() may be already NULL

View file

@ -42,7 +42,7 @@ void IdleInhibition::registerClient(Window *client)
connect(client, &Window::minimizedChanged, this, updateInhibit);
connect(client, &Window::windowHidden, this, updateInhibit);
connect(client, &Window::windowShown, this, updateInhibit);
connect(client, &Window::windowClosed, this, [this, client]() {
connect(client, &Window::closed, this, [this, client]() {
uninhibit(client);
auto it = m_connections.find(client);
if (it != m_connections.end()) {

View file

@ -242,10 +242,10 @@ void InputMethod::setPanel(InputPanelV1Window *panel)
});
connect(m_panel, &Window::frameGeometryChanged, this, &InputMethod::updateInputPanelState);
connect(m_panel, &Window::windowHidden, this, &InputMethod::updateInputPanelState);
connect(m_panel, &Window::windowClosed, this, &InputMethod::updateInputPanelState);
connect(m_panel, &Window::closed, this, &InputMethod::updateInputPanelState);
connect(m_panel, &Window::windowShown, this, &InputMethod::visibleChanged);
connect(m_panel, &Window::windowHidden, this, &InputMethod::visibleChanged);
connect(m_panel, &Window::windowClosed, this, &InputMethod::visibleChanged);
connect(m_panel, &Window::closed, this, &InputMethod::visibleChanged);
Q_EMIT visibleChanged();
updateInputPanelState();
Q_EMIT panelChanged();

View file

@ -157,7 +157,7 @@ void InputPanelV1Window::destroyWindow()
markAsZombie();
Deleted *deleted = Deleted::create(this);
Q_EMIT windowClosed(this, deleted);
Q_EMIT closed(deleted);
StackingUpdatesBlocker blocker(workspace());
waylandServer()->removeWindow(this);
deleted->unref();

View file

@ -365,7 +365,7 @@ void InternalWindow::destroyWindow()
}
Deleted *deleted = Deleted::create(this);
Q_EMIT windowClosed(this, deleted);
Q_EMIT closed(deleted);
destroyDecoration();

View file

@ -214,7 +214,7 @@ void WindowPolicy::layoutChanged(uint index)
auto it = m_layouts.find(window);
if (it == m_layouts.end()) {
m_layouts.insert(window, index);
connect(window, &Window::windowClosed, this, [this, window]() {
connect(window, &Window::closed, this, [this, window]() {
m_layouts.remove(window);
});
} else {
@ -308,7 +308,7 @@ void ApplicationPolicy::layoutChanged(uint index)
auto it = m_layouts.find(window);
if (it == m_layouts.end()) {
m_layouts.insert(window, index);
connect(window, &Window::windowClosed, this, [this, window]() {
connect(window, &Window::closed, this, [this, window]() {
m_layouts.remove(window);
});
} else {

View file

@ -177,7 +177,7 @@ void LayerShellV1Window::destroyWindow()
markAsZombie();
cleanTabBox();
Deleted *deleted = Deleted::create(this);
Q_EMIT windowClosed(this, deleted);
Q_EMIT closed(deleted);
StackingUpdatesBlocker blocker(workspace());
cleanGrouping();
waylandServer()->removeWindow(this);

View file

@ -29,7 +29,7 @@ WindowScreenCastSource::WindowScreenCastSource(Window *window, QObject *parent)
, m_window(window)
, m_offscreenRef(window)
{
connect(m_window, &Window::windowClosed, this, &ScreenCastSource::closed);
connect(m_window, &Window::closed, this, &ScreenCastSource::closed);
}
quint32 WindowScreenCastSource::drmFormat() const

View file

@ -29,16 +29,13 @@ void PopupInputFilter::handleWindowAdded(Window *window)
}
if (window->hasPopupGrab()) {
// TODO: verify that the Window is allowed as a popup
connect(window, &Window::windowClosed, this, &PopupInputFilter::handleWindowRemoved, Qt::UniqueConnection);
m_popupWindows << window;
connect(window, &Window::closed, this, [this, window]() {
m_popupWindows.removeOne(window);
});
}
}
void PopupInputFilter::handleWindowRemoved(Window *window)
{
m_popupWindows.removeOne(window);
}
bool PopupInputFilter::pointerEvent(MouseEvent *event, quint32 nativeButton)
{
if (m_popupWindows.isEmpty()) {

View file

@ -26,8 +26,6 @@ public:
private:
void handleWindowAdded(Window *client);
void handleWindowRemoved(Window *client);
void disconnectClient(Window *client);
void cancelPopups();
QVector<Window *> m_popupWindows;

View file

@ -95,7 +95,7 @@ DecorationItem::DecorationItem(KDecoration2::Decoration *decoration, Window *win
connect(window, &Window::frameGeometryChanged,
this, &DecorationItem::handleFrameGeometryChanged);
connect(window, &Window::windowClosed,
connect(window, &Window::closed,
this, &DecorationItem::handleWindowClosed);
connect(window, &Window::outputChanged,
this, &DecorationItem::handleOutputChanged);
@ -165,7 +165,7 @@ void DecorationItem::handleFrameGeometryChanged()
setSize(m_window->size().toSize());
}
void DecorationItem::handleWindowClosed(Window *original, Window *deleted)
void DecorationItem::handleWindowClosed(Window *deleted)
{
m_window = deleted;

View file

@ -87,7 +87,7 @@ public:
private Q_SLOTS:
void handleFrameGeometryChanged();
void handleWindowClosed(Window *original, Window *deleted);
void handleWindowClosed(Window *deleted);
void handleOutputChanged();
void handleOutputScaleChanged();

View file

@ -27,7 +27,7 @@ ShadowItem::ShadowItem(Shadow *shadow, Window *window, Scene *scene, Item *paren
, m_shadow(shadow)
, m_textureProvider(Compositor::self()->scene()->createShadowTextureProvider(shadow))
{
connect(window, &Window::windowClosed, this, &ShadowItem::handleWindowClosed);
connect(window, &Window::closed, this, &ShadowItem::handleWindowClosed);
connect(shadow, &Shadow::offsetChanged, this, &ShadowItem::updateGeometry);
connect(shadow, &Shadow::rectChanged, this, &ShadowItem::updateGeometry);
@ -67,7 +67,7 @@ void ShadowItem::handleTextureChanged()
m_textureDirty = true;
}
void ShadowItem::handleWindowClosed(Window *original, Window *deleted)
void ShadowItem::handleWindowClosed(Window *deleted)
{
m_window = deleted;
}

View file

@ -49,7 +49,7 @@ protected:
private Q_SLOTS:
void handleTextureChanged();
void updateGeometry();
void handleWindowClosed(Window *original, Window *deleted);
void handleWindowClosed(Window *deleted);
private:
Window *m_window;

View file

@ -20,7 +20,7 @@ SurfaceItemInternal::SurfaceItemInternal(InternalWindow *window, Scene *scene, I
{
connect(window, &Window::bufferGeometryChanged,
this, &SurfaceItemInternal::handleBufferGeometryChanged);
connect(window, &Window::windowClosed,
connect(window, &Window::closed,
this, &SurfaceItemInternal::handleWindowClosed);
setSize(window->bufferGeometry().size());
@ -54,7 +54,7 @@ void SurfaceItemInternal::handleBufferGeometryChanged(const QRectF &old)
setSize(m_window->bufferGeometry().size());
}
void SurfaceItemInternal::handleWindowClosed(Window *original, Window *deleted)
void SurfaceItemInternal::handleWindowClosed(Window *deleted)
{
m_window = deleted;
}

View file

@ -31,7 +31,7 @@ public:
private Q_SLOTS:
void handleBufferGeometryChanged(const QRectF &old);
void handleWindowClosed(Window *original, Window *deleted);
void handleWindowClosed(Window *deleted);
protected:
std::unique_ptr<SurfacePixmap> createPixmap() override;

View file

@ -207,7 +207,7 @@ SurfaceItemXwayland::SurfaceItemXwayland(Window *window, Scene *scene, Item *par
, m_window(window)
{
connect(window, &Window::geometryShapeChanged, this, &SurfaceItemXwayland::discardQuads);
connect(window, &Window::windowClosed, this, &SurfaceItemXwayland::handleWindowClosed);
connect(window, &Window::closed, this, &SurfaceItemXwayland::handleWindowClosed);
}
QVector<QRectF> SurfaceItemXwayland::shape() const
@ -222,7 +222,7 @@ QVector<QRectF> SurfaceItemXwayland::shape() const
return shape;
}
void SurfaceItemXwayland::handleWindowClosed(Window *original, Window *deleted)
void SurfaceItemXwayland::handleWindowClosed(Window *deleted)
{
m_window = deleted;
}

View file

@ -90,7 +90,7 @@ public:
QVector<QRectF> shape() const override;
private:
void handleWindowClosed(Window *original, Window *deleted);
void handleWindowClosed(Window *deleted);
Window *m_window;
};

View file

@ -21,7 +21,7 @@ SurfaceItemX11::SurfaceItemX11(Window *window, Scene *scene, Item *parent)
this, &SurfaceItemX11::handleBufferGeometryChanged);
connect(window, &Window::geometryShapeChanged,
this, &SurfaceItemX11::handleGeometryShapeChanged);
connect(window, &Window::windowClosed,
connect(window, &Window::closed,
this, &SurfaceItemX11::handleWindowClosed);
m_damageHandle = xcb_generate_id(kwinApp()->x11Connection());
@ -49,7 +49,7 @@ Window *SurfaceItemX11::window() const
return m_window;
}
void SurfaceItemX11::handleWindowClosed(Window *original, Window *deleted)
void SurfaceItemX11::handleWindowClosed(Window *deleted)
{
m_window = deleted;
}

View file

@ -40,7 +40,7 @@ public:
private Q_SLOTS:
void handleBufferGeometryChanged(const QRectF &old);
void handleGeometryShapeChanged();
void handleWindowClosed(Window *original, Window *deleted);
void handleWindowClosed(Window *deleted);
protected:
std::unique_ptr<SurfacePixmap> createPixmap() override;

View file

@ -52,7 +52,7 @@ WindowItem::WindowItem(Window *window, Scene *scene, Item *parent)
connect(window, &Window::stackingOrderChanged, this, &WindowItem::updateStackingOrder);
updateStackingOrder();
connect(window, &Window::windowClosed, this, &WindowItem::handleWindowClosed);
connect(window, &Window::closed, this, &WindowItem::handleWindowClosed);
}
WindowItem::~WindowItem()
@ -142,7 +142,7 @@ void WindowItem::deelevate()
updateStackingOrder();
}
void WindowItem::handleWindowClosed(Window *original, Window *deleted)
void WindowItem::handleWindowClosed(Window *deleted)
{
m_window = deleted;
}

View file

@ -59,7 +59,7 @@ protected:
void updateSurfaceItem(SurfaceItem *surfaceItem);
private Q_SLOTS:
void handleWindowClosed(Window *original, Window *deleted);
void handleWindowClosed(Window *deleted);
void updateDecorationItem();
void updateShadowItem();
void updateSurfacePosition();

View file

@ -144,7 +144,7 @@ void Unmanaged::release(ReleaseReason releaseReason)
if (releaseReason != ReleaseReason::KWinShutsDown) {
del = Deleted::create(this);
}
Q_EMIT windowClosed(this, del);
Q_EMIT closed(del);
finishCompositing(releaseReason);
if (!QWidget::find(window()) && releaseReason != ReleaseReason::Destroyed) { // don't affect our own windows
if (Xcb::Extensions::self()->isShapeAvailable()) {

View file

@ -1408,7 +1408,7 @@ Q_SIGNALS:
void damaged(KWin::Window *window);
void inputTransformationChanged();
void geometryShapeChanged(const QRectF &old);
void windowClosed(KWin::Window *window, KWin::Window *deleted);
void closed(KWin::Window *deleted);
void windowShown(KWin::Window *window);
void windowHidden(KWin::Window *window);
/**

View file

@ -367,7 +367,7 @@ void X11Window::releaseWindow(bool on_shutdown)
if (isInteractiveMoveResize()) {
Q_EMIT interactiveMoveResizeFinished();
}
Q_EMIT windowClosed(this, del);
Q_EMIT closed(del);
finishCompositing();
workspace()->rulebook()->discardUsed(this, true); // Remove ForceTemporarily rules
StackingUpdatesBlocker blocker(workspace());
@ -433,7 +433,7 @@ void X11Window::destroyWindow()
if (isInteractiveMoveResize()) {
Q_EMIT interactiveMoveResizeFinished();
}
Q_EMIT windowClosed(this, del);
Q_EMIT closed(del);
finishCompositing(ReleaseReason::Destroyed);
workspace()->rulebook()->discardUsed(this, true); // Remove ForceTemporarily rules
StackingUpdatesBlocker blocker(workspace());

View file

@ -296,7 +296,7 @@ void XdgSurfaceWindow::destroyWindow()
m_configureTimer->stop();
cleanTabBox();
Deleted *deleted = Deleted::create(this);
Q_EMIT windowClosed(this, deleted);
Q_EMIT closed(deleted);
StackingUpdatesBlocker blocker(workspace());
workspace()->rulebook()->discardUsed(this, true);
setDecoration(nullptr);