diff --git a/interfaces/innerkits/wm/wm_common.h b/interfaces/innerkits/wm/wm_common.h index 4b262814..308561b1 100644 --- a/interfaces/innerkits/wm/wm_common.h +++ b/interfaces/innerkits/wm/wm_common.h @@ -23,19 +23,19 @@ enum class WindowType : uint32_t { APP_WINDOW_BASE = 1, APP_MAIN_WINDOW_BASE = APP_WINDOW_BASE, WINDOW_TYPE_APP_MAIN_WINDOW = APP_MAIN_WINDOW_BASE, - APP_MAIN_WINDOW_END = WINDOW_TYPE_APP_MAIN_WINDOW, // equals last window type + APP_MAIN_WINDOW_END, APP_SUB_WINDOW_BASE = 1000, WINDOW_TYPE_MEDIA = APP_SUB_WINDOW_BASE, WINDOW_TYPE_APP_SUB_WINDOW, - APP_SUB_WINDOW_END = WINDOW_TYPE_APP_SUB_WINDOW, // equals last window type + APP_SUB_WINDOW_END, APP_WINDOW_END = APP_SUB_WINDOW_END, SYSTEM_WINDOW_BASE = 2000, BELOW_APP_SYSTEM_WINDOW_BASE = SYSTEM_WINDOW_BASE, WINDOW_TYPE_WALLPAPER = SYSTEM_WINDOW_BASE, WINDOW_TYPE_DESKTOP, - BELOW_APP_SYSTEM_WINDOW_END = WINDOW_TYPE_DESKTOP, // equals last window type + BELOW_APP_SYSTEM_WINDOW_END, ABOVE_APP_SYSTEM_WINDOW_BASE = 2100, WINDOW_TYPE_APP_LAUNCHING = ABOVE_APP_SYSTEM_WINDOW_BASE, @@ -55,7 +55,9 @@ enum class WindowType : uint32_t { WINDOW_TYPE_POINTER, WINDOW_TYPE_LAUNCHER_RECENT, WINDOW_TYPE_LAUNCHER_DOCK, - ABOVE_APP_SYSTEM_WINDOW_END = WINDOW_TYPE_LAUNCHER_DOCK, // equals last window type + WINDOW_TYPE_BOOT_ANIMATION, + ABOVE_APP_SYSTEM_WINDOW_END, + SYSTEM_WINDOW_END = ABOVE_APP_SYSTEM_WINDOW_END, }; diff --git a/utils/include/window_helper.h b/utils/include/window_helper.h index 5ee5034d..8adfee83 100644 --- a/utils/include/window_helper.h +++ b/utils/include/window_helper.h @@ -25,12 +25,12 @@ class WindowHelper { public: static inline bool IsMainWindow(WindowType type) { - return (type >= WindowType::APP_MAIN_WINDOW_BASE && type <= WindowType::APP_MAIN_WINDOW_END); + return (type >= WindowType::APP_MAIN_WINDOW_BASE && type < WindowType::APP_MAIN_WINDOW_END); } static inline bool IsSubWindow(WindowType type) { - return (type >= WindowType::APP_SUB_WINDOW_BASE && type <= WindowType::APP_SUB_WINDOW_END); + return (type >= WindowType::APP_SUB_WINDOW_BASE && type < WindowType::APP_SUB_WINDOW_END); } static inline bool IsAppWindow(WindowType type) @@ -40,12 +40,12 @@ public: static inline bool IsBelowSystemWindow(WindowType type) { - return (type >= WindowType::BELOW_APP_SYSTEM_WINDOW_BASE && type <= WindowType::BELOW_APP_SYSTEM_WINDOW_END); + return (type >= WindowType::BELOW_APP_SYSTEM_WINDOW_BASE && type < WindowType::BELOW_APP_SYSTEM_WINDOW_END); } static inline bool IsAboveSystemWindow(WindowType type) { - return (type >= WindowType::ABOVE_APP_SYSTEM_WINDOW_BASE && type <= WindowType::ABOVE_APP_SYSTEM_WINDOW_END); + return (type >= WindowType::ABOVE_APP_SYSTEM_WINDOW_BASE && type < WindowType::ABOVE_APP_SYSTEM_WINDOW_END); } static inline bool IsSystemWindow(WindowType type) diff --git a/wm/src/window_impl.cpp b/wm/src/window_impl.cpp index 3305e66e..2e0e7b80 100644 --- a/wm/src/window_impl.cpp +++ b/wm/src/window_impl.cpp @@ -1212,7 +1212,7 @@ void WindowImpl::SetDefaultOption() property_->SetWindowMode(WindowMode::WINDOW_MODE_FLOATING); break; } - case WindowType::SYSTEM_WINDOW_END: // SYSTEM_WINDOW_END is for boot animation, is unfocusable. + case WindowType::WINDOW_TYPE_BOOT_ANIMATION: case WindowType::WINDOW_TYPE_POINTER: { property_->SetFocusable(false); break; diff --git a/wmserver/include/window_zorder_policy.h b/wmserver/include/window_zorder_policy.h index 59647549..17e87476 100644 --- a/wmserver/include/window_zorder_policy.h +++ b/wmserver/include/window_zorder_policy.h @@ -59,6 +59,7 @@ private: { WindowType::WINDOW_TYPE_KEYGUARD, 114 }, { WindowType::WINDOW_TYPE_DRAGGING_EFFECT, 115 }, { WindowType::WINDOW_TYPE_POINTER, 116 }, + { WindowType::WINDOW_TYPE_BOOT_ANIMATION, 117 }, }; }; }