mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:17: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
|
@ -10,7 +10,6 @@
|
|||
#include <WindowServer/WSEvent.h>
|
||||
#include <WindowServer/WindowServerEndpoint.h>
|
||||
|
||||
class WSMenuApplet;
|
||||
class WSWindow;
|
||||
class WSMenu;
|
||||
class WSMenuBar;
|
||||
|
@ -88,13 +87,8 @@ private:
|
|||
virtual OwnPtr<WindowServer::DismissMenuResponse> handle(const WindowServer::DismissMenu&) override;
|
||||
virtual OwnPtr<WindowServer::SetWindowIconBitmapResponse> handle(const WindowServer::SetWindowIconBitmap&) override;
|
||||
virtual void handle(const WindowServer::WM_SetWindowTaskbarRect&) override;
|
||||
virtual OwnPtr<WindowServer::CreateMenuAppletResponse> handle(const WindowServer::CreateMenuApplet&) override;
|
||||
virtual OwnPtr<WindowServer::DestroyMenuAppletResponse> handle(const WindowServer::DestroyMenuApplet&) override;
|
||||
virtual OwnPtr<WindowServer::SetMenuAppletBackingStoreResponse> handle(const WindowServer::SetMenuAppletBackingStore&) override;
|
||||
virtual OwnPtr<WindowServer::InvalidateMenuAppletRectResponse> handle(const WindowServer::InvalidateMenuAppletRect&) override;
|
||||
virtual OwnPtr<WindowServer::StartDragResponse> handle(const WindowServer::StartDrag&) override;
|
||||
|
||||
HashMap<i32, NonnullOwnPtr<WSMenuApplet>> m_menu_applets;
|
||||
HashMap<int, NonnullRefPtr<WSWindow>> m_windows;
|
||||
HashMap<int, NonnullOwnPtr<WSMenuBar>> m_menubars;
|
||||
HashMap<int, NonnullRefPtr<WSMenu>> m_menus;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue