From c91b90c58a5891bbea0476fc726b5a46eeb0cb38 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Mon, 13 Mar 2023 21:21:11 +0200 Subject: [PATCH] Tidy Window::windowClosed() signal "window" is redundant, so remove it. Also remove the original window argument to improve the API consistency. --- autotests/integration/activities_test.cpp | 2 +- autotests/integration/dbus_interface_test.cpp | 4 ++-- .../integration/desktop_window_x11_test.cpp | 2 +- .../dont_crash_aurorae_destroy_deco.cpp | 2 +- .../integration/dont_crash_cancel_animation.cpp | 2 +- autotests/integration/dont_crash_empty_deco.cpp | 2 +- autotests/integration/dont_crash_glxgears.cpp | 2 +- .../dont_crash_reinitialize_compositor.cpp | 2 +- .../effects/popup_open_close_animation_test.cpp | 4 ++-- .../integration/effects/slidingpopups_test.cpp | 6 +++--- .../toplevel_open_close_animation_test.cpp | 4 ++-- .../integration/effects/translucency_test.cpp | 4 ++-- autotests/integration/globalshortcuts_test.cpp | 2 +- autotests/integration/input_stacking_order.cpp | 2 +- autotests/integration/internal_window.cpp | 2 +- .../integration/move_resize_window_test.cpp | 10 +++++----- autotests/integration/plasmawindow_test.cpp | 2 +- autotests/integration/quick_tiling_test.cpp | 4 ++-- .../integration/screenedge_client_show_test.cpp | 4 ++-- autotests/integration/shade_test.cpp | 2 +- autotests/integration/stacking_order_test.cpp | 12 ++++++------ autotests/integration/struts_test.cpp | 8 ++++---- autotests/integration/window_rules_test.cpp | 4 ++-- autotests/integration/x11_window_test.cpp | 16 ++++++++-------- autotests/integration/xwayland_input_test.cpp | 4 ++-- src/deleted.cpp | 2 +- src/effects.cpp | 8 ++++++-- src/idle_inhibition.cpp | 2 +- src/inputmethod.cpp | 4 ++-- src/inputpanelv1window.cpp | 2 +- src/internalwindow.cpp | 2 +- src/keyboard_layout_switching.cpp | 4 ++-- src/layershellv1window.cpp | 2 +- .../screencast/windowscreencastsource.cpp | 2 +- src/popup_input_filter.cpp | 9 +++------ src/popup_input_filter.h | 2 -- src/scene/decorationitem.cpp | 4 ++-- src/scene/decorationitem.h | 2 +- src/scene/shadowitem.cpp | 4 ++-- src/scene/shadowitem.h | 2 +- src/scene/surfaceitem_internal.cpp | 4 ++-- src/scene/surfaceitem_internal.h | 2 +- src/scene/surfaceitem_wayland.cpp | 4 ++-- src/scene/surfaceitem_wayland.h | 2 +- src/scene/surfaceitem_x11.cpp | 4 ++-- src/scene/surfaceitem_x11.h | 2 +- src/scene/windowitem.cpp | 4 ++-- src/scene/windowitem.h | 2 +- src/unmanaged.cpp | 2 +- src/window.h | 2 +- src/x11window.cpp | 4 ++-- src/xdgshellwindow.cpp | 2 +- 52 files changed, 96 insertions(+), 97 deletions(-) diff --git a/autotests/integration/activities_test.cpp b/autotests/integration/activities_test.cpp index b8bcc54043..6fa2c03620 100644 --- a/autotests/integration/activities_test.cpp +++ b/autotests/integration/activities_test.cpp @@ -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()); } diff --git a/autotests/integration/dbus_interface_test.cpp b/autotests/integration/dbus_interface_test.cpp index e4ee9e1b0c..0774e0362d 100644 --- a/autotests/integration/dbus_interface_test.cpp +++ b/autotests/integration/dbus_interface_test.cpp @@ -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(); diff --git a/autotests/integration/desktop_window_x11_test.cpp b/autotests/integration/desktop_window_x11_test.cpp index b7c71bb168..9fe30dfea8 100644 --- a/autotests/integration/desktop_window_x11_test.cpp +++ b/autotests/integration/desktop_window_x11_test.cpp @@ -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()); } diff --git a/autotests/integration/dont_crash_aurorae_destroy_deco.cpp b/autotests/integration/dont_crash_aurorae_destroy_deco.cpp index 3742b8e520..33d806c50f 100644 --- a/autotests/integration/dont_crash_aurorae_destroy_deco.cpp +++ b/autotests/integration/dont_crash_aurorae_destroy_deco.cpp @@ -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()); } diff --git a/autotests/integration/dont_crash_cancel_animation.cpp b/autotests/integration/dont_crash_cancel_animation.cpp index 1a2c2a71ed..b23cc26d0d 100644 --- a/autotests/integration/dont_crash_cancel_animation.cpp +++ b/autotests/integration/dont_crash_cancel_animation.cpp @@ -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(); diff --git a/autotests/integration/dont_crash_empty_deco.cpp b/autotests/integration/dont_crash_empty_deco.cpp index 7b72440dc0..b543195c58 100644 --- a/autotests/integration/dont_crash_empty_deco.cpp +++ b/autotests/integration/dont_crash_empty_deco.cpp @@ -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()); } diff --git a/autotests/integration/dont_crash_glxgears.cpp b/autotests/integration/dont_crash_glxgears.cpp index c44ef0e57a..3684991104 100644 --- a/autotests/integration/dont_crash_glxgears.cpp +++ b/autotests/integration/dont_crash_glxgears.cpp @@ -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); diff --git a/autotests/integration/dont_crash_reinitialize_compositor.cpp b/autotests/integration/dont_crash_reinitialize_compositor.cpp index 7dd4249060..ad1d1b9f5f 100644 --- a/autotests/integration/dont_crash_reinitialize_compositor.cpp +++ b/autotests/integration/dont_crash_reinitialize_compositor.cpp @@ -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()); diff --git a/autotests/integration/effects/popup_open_close_animation_test.cpp b/autotests/integration/effects/popup_open_close_animation_test.cpp index 11ea0bc26a..7378b939eb 100644 --- a/autotests/integration/effects/popup_open_close_animation_test.cpp +++ b/autotests/integration/effects/popup_open_close_animation_test.cpp @@ -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()); diff --git a/autotests/integration/effects/slidingpopups_test.cpp b/autotests/integration/effects/slidingpopups_test.cpp index fcebefb7fd..2f787ecf14 100644 --- a/autotests/integration/effects/slidingpopups_test.cpp +++ b/autotests/integration/effects/slidingpopups_test.cpp @@ -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()); diff --git a/autotests/integration/effects/toplevel_open_close_animation_test.cpp b/autotests/integration/effects/toplevel_open_close_animation_test.cpp index dec991979d..797870a209 100644 --- a/autotests/integration/effects/toplevel_open_close_animation_test.cpp +++ b/autotests/integration/effects/toplevel_open_close_animation_test.cpp @@ -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()); diff --git a/autotests/integration/effects/translucency_test.cpp b/autotests/integration/effects/translucency_test.cpp index 3be4f2ab55..f2ddc98f73 100644 --- a/autotests/integration/effects/translucency_test.cpp +++ b/autotests/integration/effects/translucency_test.cpp @@ -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()); diff --git a/autotests/integration/globalshortcuts_test.cpp b/autotests/integration/globalshortcuts_test.cpp index 1871bda61a..04ab723d16 100644 --- a/autotests/integration/globalshortcuts_test.cpp +++ b/autotests/integration/globalshortcuts_test.cpp @@ -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()); diff --git a/autotests/integration/input_stacking_order.cpp b/autotests/integration/input_stacking_order.cpp index 16de4eefc3..7080c510ac 100644 --- a/autotests/integration/input_stacking_order.cpp +++ b/autotests/integration/input_stacking_order.cpp @@ -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()); diff --git a/autotests/integration/internal_window.cpp b/autotests/integration/internal_window.cpp index a5b916ba74..12e80ea3d7 100644 --- a/autotests/integration/internal_window.cpp +++ b/autotests/integration/internal_window.cpp @@ -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++); diff --git a/autotests/integration/move_resize_window_test.cpp b/autotests/integration/move_resize_window_test.cpp index 74718ba774..e0f94dbefa 100644 --- a/autotests/integration/move_resize_window_test.cpp +++ b/autotests/integration/move_resize_window_test.cpp @@ -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()); diff --git a/autotests/integration/plasmawindow_test.cpp b/autotests/integration/plasmawindow_test.cpp index 45f189d77c..d348dcfed6 100644 --- a/autotests/integration/plasmawindow_test.cpp +++ b/autotests/integration/plasmawindow_test.cpp @@ -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(); diff --git a/autotests/integration/quick_tiling_test.cpp b/autotests/integration/quick_tiling_test.cpp index a9ee46e378..e1feb88b48 100644 --- a/autotests/integration/quick_tiling_test.cpp +++ b/autotests/integration/quick_tiling_test.cpp @@ -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()); } diff --git a/autotests/integration/screenedge_client_show_test.cpp b/autotests/integration/screenedge_client_show_test.cpp index 88b0414b1a..ebd50732a2 100644 --- a/autotests/integration/screenedge_client_show_test.cpp +++ b/autotests/integration/screenedge_client_show_test.cpp @@ -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()); diff --git a/autotests/integration/shade_test.cpp b/autotests/integration/shade_test.cpp index 9dea639596..8b2835b93c 100644 --- a/autotests/integration/shade_test.cpp +++ b/autotests/integration/shade_test.cpp @@ -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()); } diff --git a/autotests/integration/stacking_order_test.cpp b/autotests/integration/stacking_order_test.cpp index 31f95a0185..f7bfd817c5 100644 --- a/autotests/integration/stacking_order_test.cpp +++ b/autotests/integration/stacking_order_test.cpp @@ -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 deletedTransient( - windowClosedSpy.first().at(1).value()); + windowClosedSpy.first().at(0).value()); 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{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 deletedTransient( - windowClosedSpy.first().at(1).value()); + windowClosedSpy.first().at(0).value()); QVERIFY(deletedTransient.get()); // The transient has to be above each member of the window group. diff --git a/autotests/integration/struts_test.cpp b/autotests/integration/struts_test.cpp index fbf3cd022d..04ce10cac9 100644 --- a/autotests/integration/struts_test.cpp +++ b/autotests/integration/struts_test.cpp @@ -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()); } diff --git a/autotests/integration/window_rules_test.cpp b/autotests/integration/window_rules_test.cpp index b247fbe5aa..6960c81b67 100644 --- a/autotests/integration/window_rules_test.cpp +++ b/autotests/integration/window_rules_test.cpp @@ -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()); diff --git a/autotests/integration/x11_window_test.cpp b/autotests/integration/x11_window_test.cpp index ccd9881a65..e0fa7e2133 100644 --- a/autotests/integration/x11_window_test.cpp +++ b/autotests/integration/x11_window_test.cpp @@ -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()); diff --git a/autotests/integration/xwayland_input_test.cpp b/autotests/integration/xwayland_input_test.cpp index 59f45f7c34..c551be049f 100644 --- a/autotests/integration/xwayland_input_test.cpp +++ b/autotests/integration/xwayland_input_test.cpp @@ -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()); diff --git a/src/deleted.cpp b/src/deleted.cpp index 3426af9cfd..61e3bc36d0 100644 --- a/src/deleted.cpp +++ b/src/deleted.cpp @@ -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(); diff --git a/src/effects.cpp b/src/effects.cpp index c773245ba8..1278f19abb 100644 --- a/src/effects.cpp +++ b/src/effects.cpp @@ -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 diff --git a/src/idle_inhibition.cpp b/src/idle_inhibition.cpp index fd2b8c28c8..93ad0fac8e 100644 --- a/src/idle_inhibition.cpp +++ b/src/idle_inhibition.cpp @@ -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()) { diff --git a/src/inputmethod.cpp b/src/inputmethod.cpp index d2c7769036..8e256c3822 100644 --- a/src/inputmethod.cpp +++ b/src/inputmethod.cpp @@ -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(); diff --git a/src/inputpanelv1window.cpp b/src/inputpanelv1window.cpp index c5640374d7..f11f169c38 100644 --- a/src/inputpanelv1window.cpp +++ b/src/inputpanelv1window.cpp @@ -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(); diff --git a/src/internalwindow.cpp b/src/internalwindow.cpp index 93fda9dbe3..3411e8ee85 100644 --- a/src/internalwindow.cpp +++ b/src/internalwindow.cpp @@ -365,7 +365,7 @@ void InternalWindow::destroyWindow() } Deleted *deleted = Deleted::create(this); - Q_EMIT windowClosed(this, deleted); + Q_EMIT closed(deleted); destroyDecoration(); diff --git a/src/keyboard_layout_switching.cpp b/src/keyboard_layout_switching.cpp index c51458be05..72397fb004 100644 --- a/src/keyboard_layout_switching.cpp +++ b/src/keyboard_layout_switching.cpp @@ -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 { diff --git a/src/layershellv1window.cpp b/src/layershellv1window.cpp index cfb97a6cf4..e39e02462b 100644 --- a/src/layershellv1window.cpp +++ b/src/layershellv1window.cpp @@ -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); diff --git a/src/plugins/screencast/windowscreencastsource.cpp b/src/plugins/screencast/windowscreencastsource.cpp index 31fe5d746f..80ee52d29d 100644 --- a/src/plugins/screencast/windowscreencastsource.cpp +++ b/src/plugins/screencast/windowscreencastsource.cpp @@ -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 diff --git a/src/popup_input_filter.cpp b/src/popup_input_filter.cpp index e57dbb059e..b3a4881de1 100644 --- a/src/popup_input_filter.cpp +++ b/src/popup_input_filter.cpp @@ -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()) { diff --git a/src/popup_input_filter.h b/src/popup_input_filter.h index 1b6bf83871..77f08e9ccf 100644 --- a/src/popup_input_filter.h +++ b/src/popup_input_filter.h @@ -26,8 +26,6 @@ public: private: void handleWindowAdded(Window *client); - void handleWindowRemoved(Window *client); - void disconnectClient(Window *client); void cancelPopups(); QVector m_popupWindows; diff --git a/src/scene/decorationitem.cpp b/src/scene/decorationitem.cpp index ea3d68c197..5798277f5b 100644 --- a/src/scene/decorationitem.cpp +++ b/src/scene/decorationitem.cpp @@ -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; diff --git a/src/scene/decorationitem.h b/src/scene/decorationitem.h index 466aa18297..a0edecb9f4 100644 --- a/src/scene/decorationitem.h +++ b/src/scene/decorationitem.h @@ -87,7 +87,7 @@ public: private Q_SLOTS: void handleFrameGeometryChanged(); - void handleWindowClosed(Window *original, Window *deleted); + void handleWindowClosed(Window *deleted); void handleOutputChanged(); void handleOutputScaleChanged(); diff --git a/src/scene/shadowitem.cpp b/src/scene/shadowitem.cpp index 1b3727a559..17a2ae6a6a 100644 --- a/src/scene/shadowitem.cpp +++ b/src/scene/shadowitem.cpp @@ -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; } diff --git a/src/scene/shadowitem.h b/src/scene/shadowitem.h index e96393f774..09e0ec56e2 100644 --- a/src/scene/shadowitem.h +++ b/src/scene/shadowitem.h @@ -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; diff --git a/src/scene/surfaceitem_internal.cpp b/src/scene/surfaceitem_internal.cpp index beb6255824..cfc02d791c 100644 --- a/src/scene/surfaceitem_internal.cpp +++ b/src/scene/surfaceitem_internal.cpp @@ -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; } diff --git a/src/scene/surfaceitem_internal.h b/src/scene/surfaceitem_internal.h index e2f53ea3c8..90c0d412b3 100644 --- a/src/scene/surfaceitem_internal.h +++ b/src/scene/surfaceitem_internal.h @@ -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 createPixmap() override; diff --git a/src/scene/surfaceitem_wayland.cpp b/src/scene/surfaceitem_wayland.cpp index be4a007c84..7fb5366897 100644 --- a/src/scene/surfaceitem_wayland.cpp +++ b/src/scene/surfaceitem_wayland.cpp @@ -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 SurfaceItemXwayland::shape() const @@ -222,7 +222,7 @@ QVector SurfaceItemXwayland::shape() const return shape; } -void SurfaceItemXwayland::handleWindowClosed(Window *original, Window *deleted) +void SurfaceItemXwayland::handleWindowClosed(Window *deleted) { m_window = deleted; } diff --git a/src/scene/surfaceitem_wayland.h b/src/scene/surfaceitem_wayland.h index e358972c3a..28a98fdbd5 100644 --- a/src/scene/surfaceitem_wayland.h +++ b/src/scene/surfaceitem_wayland.h @@ -90,7 +90,7 @@ public: QVector shape() const override; private: - void handleWindowClosed(Window *original, Window *deleted); + void handleWindowClosed(Window *deleted); Window *m_window; }; diff --git a/src/scene/surfaceitem_x11.cpp b/src/scene/surfaceitem_x11.cpp index be6504e769..3adefedbc6 100644 --- a/src/scene/surfaceitem_x11.cpp +++ b/src/scene/surfaceitem_x11.cpp @@ -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; } diff --git a/src/scene/surfaceitem_x11.h b/src/scene/surfaceitem_x11.h index 4fc27f9e2e..d30556764e 100644 --- a/src/scene/surfaceitem_x11.h +++ b/src/scene/surfaceitem_x11.h @@ -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 createPixmap() override; diff --git a/src/scene/windowitem.cpp b/src/scene/windowitem.cpp index 2b8cb9ee4e..a0f823e196 100644 --- a/src/scene/windowitem.cpp +++ b/src/scene/windowitem.cpp @@ -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; } diff --git a/src/scene/windowitem.h b/src/scene/windowitem.h index 2ebde224e0..5c970992bd 100644 --- a/src/scene/windowitem.h +++ b/src/scene/windowitem.h @@ -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(); diff --git a/src/unmanaged.cpp b/src/unmanaged.cpp index 1e17932c0e..3cf7ed381a 100644 --- a/src/unmanaged.cpp +++ b/src/unmanaged.cpp @@ -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()) { diff --git a/src/window.h b/src/window.h index df2a5ec538..7c21812341 100644 --- a/src/window.h +++ b/src/window.h @@ -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); /** diff --git a/src/x11window.cpp b/src/x11window.cpp index e5e8eee059..4bff364fc8 100644 --- a/src/x11window.cpp +++ b/src/x11window.cpp @@ -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()); diff --git a/src/xdgshellwindow.cpp b/src/xdgshellwindow.cpp index ada21b6198..fbc1a838df 100644 --- a/src/xdgshellwindow.cpp +++ b/src/xdgshellwindow.cpp @@ -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);