summaryrefslogtreecommitdiff
path: root/Servers/WindowServer/WSWindowFrame.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Servers/WindowServer/WSWindowFrame.cpp')
-rw-r--r--Servers/WindowServer/WSWindowFrame.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/Servers/WindowServer/WSWindowFrame.cpp b/Servers/WindowServer/WSWindowFrame.cpp
index 3fd3ae86d6..fbfe5b1db3 100644
--- a/Servers/WindowServer/WSWindowFrame.cpp
+++ b/Servers/WindowServer/WSWindowFrame.cpp
@@ -102,9 +102,13 @@ WSWindowFrame::WSWindowFrame(WSWindow& window)
m_buttons.append(move(button));
}
- m_buttons.append(make<WSButton>(*this, *s_minimize_button_bitmap, [this](auto&) {
- m_window.set_minimized(true);
- }));
+ if (window.is_minimizable()) {
+ auto button = make<WSButton>(*this, *s_minimize_button_bitmap, [this](auto&) {
+ m_window.set_minimized(true);
+ });
+ m_minimize_button = button.ptr();
+ m_buttons.append(move(button));
+ }
}
WSWindowFrame::~WSWindowFrame()