mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 06:58:11 +00:00
WindowServer: Add a window minimization button.
The window is simply ignored in the painting and hit testing traversal when in minimized state, same as we do for invisible windows. The WM_SetActiveWindow message (sent by Taskbar) brings it back into the non-minimized state. :^)
This commit is contained in:
parent
0fc3ccaa52
commit
f6ca94605c
6 changed files with 49 additions and 3 deletions
|
@ -624,6 +624,7 @@ void WSWindowManager::process_mouse_event(const WSMouseEvent& event, WSWindow*&
|
|||
if (!window->global_cursor_tracking())
|
||||
continue;
|
||||
ASSERT(window->is_visible()); // Maybe this should be supported? Idk. Let's catch it and think about it later.
|
||||
ASSERT(!window->is_minimized()); // Maybe this should also be supported? Idk.
|
||||
windows_who_received_mouse_event_due_to_cursor_tracking.set(window);
|
||||
window->on_message(event.translated(-window->position()));
|
||||
}
|
||||
|
@ -688,6 +689,8 @@ void WSWindowManager::compose()
|
|||
for (auto* window = m_windows_in_order.head(); window; window = window->next()) {
|
||||
if (!window->is_visible())
|
||||
continue;
|
||||
if (window->is_minimized())
|
||||
continue;
|
||||
if (window->opacity() < 1.0f)
|
||||
continue;
|
||||
if (window->has_alpha_channel()) {
|
||||
|
@ -712,11 +715,13 @@ void WSWindowManager::compose()
|
|||
if (!checking)
|
||||
return IterationDecision::Continue;
|
||||
if (!window.is_visible())
|
||||
return IterationDecision::Continue;;
|
||||
return IterationDecision::Continue;
|
||||
if (window.is_minimized())
|
||||
return IterationDecision::Continue;
|
||||
if (window.opacity() < 1.0f)
|
||||
return IterationDecision::Continue;;
|
||||
return IterationDecision::Continue;
|
||||
if (window.has_alpha_channel())
|
||||
return IterationDecision::Continue;;
|
||||
return IterationDecision::Continue;
|
||||
if (window.frame().rect().contains(rect)) {
|
||||
found = true;
|
||||
return IterationDecision::Abort;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue