summaryrefslogtreecommitdiff
path: root/Servers/WindowServer/WSMenuManager.h
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-12-16 15:05:45 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-12-16 15:05:45 +0100
commitdf129bbe0e3d300a9a35a966af4ee323ced90cda (patch)
tree903ed0d73fe334746f9b51a534d74ba05f0f37a6 /Servers/WindowServer/WSMenuManager.h
parent648ed760852b7458c764da2c5dba4a0a54a420f1 (diff)
downloadserenity-df129bbe0e3d300a9a35a966af4ee323ced90cda.zip
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 :^)
Diffstat (limited to 'Servers/WindowServer/WSMenuManager.h')
-rw-r--r--Servers/WindowServer/WSMenuManager.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/Servers/WindowServer/WSMenuManager.h b/Servers/WindowServer/WSMenuManager.h
index 706c0fcc96..740cd3be1a 100644
--- a/Servers/WindowServer/WSMenuManager.h
+++ b/Servers/WindowServer/WSMenuManager.h
@@ -3,7 +3,6 @@
#include "WSMenu.h"
#include <LibCore/CObject.h>
#include <LibCore/CTimer.h>
-#include <WindowServer/WSMenuApplet.h>
#include <WindowServer/WSWindow.h>
class AClientConnection;
@@ -36,9 +35,9 @@ public:
void close_everyone_not_in_lineage(WSMenu&);
void close_menu_and_descendants(WSMenu&);
- void add_applet(WSMenuApplet&);
- void remove_applet(WSMenuApplet&);
- void invalidate_applet(WSMenuApplet&, const Rect&);
+ void add_applet(WSWindow&);
+ void remove_applet(WSWindow&);
+ void invalidate_applet(const WSWindow&, const Rect&);
private:
void close_menus(const Vector<WSMenu*>&);
@@ -49,7 +48,7 @@ private:
void handle_menu_mouse_event(WSMenu&, const WSMouseEvent&);
void draw();
- void draw_applet(const WSMenuApplet&);
+ void draw_applet(const WSWindow&);
void tick_clock();
RefPtr<WSWindow> m_window;
@@ -62,7 +61,7 @@ private:
RefPtr<GraphicsBitmap> m_muted_bitmap;
RefPtr<GraphicsBitmap> m_unmuted_bitmap;
- Vector<WeakPtr<WSMenuApplet>> m_applets;
+ Vector<WeakPtr<WSWindow>> m_applets;
OwnPtr<AClientConnection> m_audio_client;