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:
parent
648ed76085
commit
df129bbe0e
13 changed files with 97 additions and 202 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue