From 5896bab86f9655b099c2bf4f88db7879b12bc03a Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Wed, 31 Jan 2024 16:19:17 +0200 Subject: [PATCH] Activate next window when an X11 window is minimized It matches the behavior of XdgToplevelWindow. BUG: 479388 --- src/x11window.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/x11window.cpp b/src/x11window.cpp index 7041fb0c86..df5e5ba852 100644 --- a/src/x11window.cpp +++ b/src/x11window.cpp @@ -1687,6 +1687,11 @@ bool X11Window::isMinimizable() const void X11Window::doMinimize() { + if (m_managed) { + if (isMinimized()) { + workspace()->activateNextWindow(this); + } + } if (isShade()) { // NETWM restriction - KWindowInfo::isMinimized() == Hidden && !Shaded info->setState(isMinimized() ? NET::States() : NET::Shaded, NET::Shaded);