소스 검색

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.
Andreas Kling 4 년 전
부모
커밋
50a8e0e495
2개의 변경된 파일7개의 추가작업 그리고 15개의 파일을 삭제
  1. 3 14
      Userland/Libraries/LibGUI/WindowType.h
  2. 4 1
      Userland/Services/WindowServer/WindowType.h

+ 3 - 14
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;
 
 }

+ 4 - 1
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,
 };
+
+}