1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-06 14:27:35 +00:00

WindowServer+CPUGraph: Make menu applets be "regular" windows

Instead of implementing menu applets as their own thing, they are now
WSWindows of WSWindowType::MenuApplet.

This makes it much easier to work with them on the client side, since
you can just create a GWindow with the right type and you're in the
menubar doing applet stuff :^)
This commit is contained in:
Andreas Kling 2019-12-16 15:05:45 +01:00
parent 648ed76085
commit df129bbe0e
13 changed files with 97 additions and 202 deletions

View file

@ -1072,6 +1072,11 @@ void WSWindowManager::invalidate(const WSWindow& window)
void WSWindowManager::invalidate(const WSWindow& window, const Rect& rect)
{
if (window.type() == WSWindowType::MenuApplet) {
menu_manager().invalidate_applet(window, rect);
return;
}
if (rect.is_empty()) {
invalidate(window);
return;