summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-03-29 22:39:18 +0200
committerAndreas Kling <kling@serenityos.org>2021-03-29 22:39:18 +0200
commit50a8e0e49507b2f6400618bdcb19f4387ce4ee2c (patch)
tree682d2f85abb2139f596d93de0247e3f2ec657198
parent2036d7518a7d1474ae37962d3ec72315c3eafe55 (diff)
downloadserenity-50a8e0e49507b2f6400618bdcb19f4387ce4ee2c.zip
LibGUI+WindowServer: Keep canonical WindowType enum in WindowServer
Having the same enum in two places was annoying. Let's just "using" the WindowServer::WindowType enum into the GUI namespace.
-rw-r--r--Userland/Libraries/LibGUI/WindowType.h17
-rw-r--r--Userland/Services/WindowServer/WindowType.h5
2 files changed, 7 insertions, 15 deletions
diff --git a/Userland/Libraries/LibGUI/WindowType.h b/Userland/Libraries/LibGUI/WindowType.h
index a7fae0987b..c8568ed153 100644
--- a/Userland/Libraries/LibGUI/WindowType.h
+++ b/Userland/Libraries/LibGUI/WindowType.h
@@ -26,21 +26,10 @@
#pragma once
+#include <Services/WindowServer/WindowType.h>
+
namespace GUI {
-// Keep this in sync with WindowServer::WindowType.
-enum class WindowType {
- Invalid = 0,
- Normal,
- Menu,
- WindowSwitcher,
- Taskbar,
- Tooltip,
- Menubar,
- MenuApplet,
- Notification,
- Desktop,
- ToolWindow,
-};
+using WindowType = WindowServer::WindowType;
}
diff --git a/Userland/Services/WindowServer/WindowType.h b/Userland/Services/WindowServer/WindowType.h
index 214aad9338..f260cc8937 100644
--- a/Userland/Services/WindowServer/WindowType.h
+++ b/Userland/Services/WindowServer/WindowType.h
@@ -26,7 +26,8 @@
#pragma once
-// Keep this in sync with GUI::WindowType.
+namespace WindowServer {
+
enum class WindowType {
Invalid = 0,
Normal,
@@ -40,3 +41,5 @@ enum class WindowType {
Desktop,
ToolWindow,
};
+
+}