mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 05:48:12 +00:00
WindowServer+TaskBar: Add a taskbar window button popup menu.
This patch only hooks up the minimize and unminimize actions.
This commit is contained in:
parent
c5c4e54a67
commit
956bd23aae
17 changed files with 158 additions and 56 deletions
|
@ -188,11 +188,14 @@ void WSMenu::close()
|
|||
menu_window()->set_visible(false);
|
||||
}
|
||||
|
||||
void WSMenu::popup(const Point& position)
|
||||
void WSMenu::popup(const Point& position, bool top_anchored)
|
||||
{
|
||||
ASSERT(!is_empty());
|
||||
auto& window = ensure_menu_window();
|
||||
window.move_to(position);
|
||||
if (top_anchored)
|
||||
window.move_to(position);
|
||||
else
|
||||
window.move_to(position.translated(0, -window.height()));
|
||||
window.set_visible(true);
|
||||
WSWindowManager::the().set_current_menu(this);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue