From db58c421eb1b873516d00244984b22e38d4935a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Thu, 3 Nov 2016 11:32:51 +0100 Subject: [PATCH] Internal windows cannot be minimized Summary: This change ensures that the DebugConsole does not have a minimize button. BUG: 372000 FIXED-IN: 5.8.4 Reviewers: #kwin, #plasma_on_wayland, broulik Subscribers: plasma-devel, kwin Tags: #plasma_on_wayland, #kwin Differential Revision: https://phabricator.kde.org/D3244 --- autotests/integration/debug_console_test.cpp | 1 + shell_client.cpp | 3 +++ 2 files changed, 4 insertions(+) diff --git a/autotests/integration/debug_console_test.cpp b/autotests/integration/debug_console_test.cpp index a21d9170a8..bff8195290 100644 --- a/autotests/integration/debug_console_test.cpp +++ b/autotests/integration/debug_console_test.cpp @@ -521,6 +521,7 @@ void DebugConsoleTest::testClosingDebugConsole() QVERIFY(c->isInternal()); QCOMPARE(c->internalWindow(), console->windowHandle()); QVERIFY(c->isDecorated()); + QCOMPARE(c->isMinimizable(), false); c->closeWindow(); QVERIFY(destroyedSpy.wait()); } diff --git a/shell_client.cpp b/shell_client.cpp index 1b4fd849c6..8315725801 100644 --- a/shell_client.cpp +++ b/shell_client.cpp @@ -582,6 +582,9 @@ bool ShellClient::isMaximizable() const bool ShellClient::isMinimizable() const { + if (m_internal) { + return false; + } return (!m_plasmaShellSurface || m_plasmaShellSurface->role() == PlasmaShellSurfaceInterface::Role::Normal); }