private static void TryLockWindow(EditorWindow newWindow)
        {
            var windowType = newWindow.GetType();

            if (EditorWindowLocker.TryGetWindowLocker(windowType, out var locker))
            {
                locker.LockWindow(newWindow, true);
            }
        }
        public static bool TryGetWindowLocker(Type windowType, out EditorWindowLocker locker)
        {
            if (_CachedLockers.TryGetValue(windowType, out locker))
            {
                return(locker != null);
            }

            if (typeof(EditorWindow).IsAssignableFrom(windowType) && GetLockTrackerField(windowType) != null)
            {
                locker = new EditorWindowLocker(windowType);
            }

            _CachedLockers[windowType] = locker;
            return(locker != null);
        }