Skip to content

Commit bada7b8

Browse files
author
serg.morozov
committed
fix: BringOnTop bugfix
1 parent 17baacf commit bada7b8

File tree

13 files changed

+2234
-68
lines changed

13 files changed

+2234
-68
lines changed

Assets/com.nuclearband.windowsmanager/Runtime/WindowPredicates.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public static bool IsPortrait()
1111
return Screen.width < Screen.height;
1212
#endif
1313
#pragma warning disable CS0162
14-
return Screen.orientation == ScreenOrientation.Portrait;
14+
return Screen.orientation is ScreenOrientation.Portrait or ScreenOrientation.PortraitUpsideDown;
1515
#pragma warning restore CS0162
1616
}
1717

@@ -21,7 +21,7 @@ public static bool IsLandscape()
2121
return Screen.width >= Screen.height;
2222
#endif
2323
#pragma warning disable CS0162
24-
return Screen.orientation == ScreenOrientation.Landscape;
24+
return Screen.orientation is ScreenOrientation.LandscapeLeft or ScreenOrientation.LandscapeRight;
2525
#pragma warning restore CS0162
2626
}
2727

Assets/com.nuclearband.windowsmanager/Runtime/WindowsManager.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,9 @@ public static void BringOnTop(Window window)
152152
continue;
153153
windows.RemoveAt(i);
154154
windows.Add(windowReference);
155+
var windowsBuildData = windowBuildDataList[i];
156+
windowBuildDataList.RemoveAt(i);
157+
windowBuildDataList.Add(windowsBuildData);
155158
break;
156159
}
157160
}

Assets/com.nuclearband.windowsmanager/Runtime/WindowsManagerSettings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ public class WindowsManagerSettings
88
{
99
public string RootPath = "Root";
1010
public string InputBlockPath = "InputBlock";
11-
public Dictionary<string, Func<bool>> SuffixesWithPredicates = new Dictionary<string, Func<bool>>();
11+
public Dictionary<string, Func<bool>> SuffixesWithPredicates = new();
1212
}
1313
}

Packages/manifest.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"dependencies": {
3-
"com.unity.ide.rider": "3.0.6",
4-
"com.unity.ide.visualstudio": "2.0.7",
5-
"com.unity.ide.vscode": "1.2.3",
3+
"com.unity.ide.rider": "3.0.15",
4+
"com.unity.ide.visualstudio": "2.0.16",
5+
"com.unity.ide.vscode": "1.2.5",
66
"com.unity.ugui": "1.0.0",
77
"com.unity.modules.ai": "1.0.0",
88
"com.unity.modules.androidjni": "1.0.0",

Packages/packages-lock.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"url": "https://packages.unity.com"
99
},
1010
"com.unity.ide.rider": {
11-
"version": "3.0.6",
11+
"version": "3.0.15",
1212
"depth": 0,
1313
"source": "registry",
1414
"dependencies": {
@@ -17,7 +17,7 @@
1717
"url": "https://packages.unity.com"
1818
},
1919
"com.unity.ide.visualstudio": {
20-
"version": "2.0.7",
20+
"version": "2.0.16",
2121
"depth": 0,
2222
"source": "registry",
2323
"dependencies": {
@@ -26,14 +26,14 @@
2626
"url": "https://packages.unity.com"
2727
},
2828
"com.unity.ide.vscode": {
29-
"version": "1.2.3",
29+
"version": "1.2.5",
3030
"depth": 0,
3131
"source": "registry",
3232
"dependencies": {},
3333
"url": "https://packages.unity.com"
3434
},
3535
"com.unity.test-framework": {
36-
"version": "1.1.24",
36+
"version": "1.1.31",
3737
"depth": 1,
3838
"source": "registry",
3939
"dependencies": {
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
%YAML 1.1
2+
%TAG !u! tag:unity3d.com,2011:
3+
--- !u!387306366 &1
4+
MemorySettings:
5+
m_ObjectHideFlags: 0
6+
m_EditorMemorySettings:
7+
m_MainAllocatorBlockSize: -1
8+
m_ThreadAllocatorBlockSize: -1
9+
m_MainGfxBlockSize: -1
10+
m_ThreadGfxBlockSize: -1
11+
m_CacheBlockSize: -1
12+
m_TypetreeBlockSize: -1
13+
m_ProfilerBlockSize: -1
14+
m_ProfilerEditorBlockSize: -1
15+
m_BucketAllocatorGranularity: -1
16+
m_BucketAllocatorBucketsCount: -1
17+
m_BucketAllocatorBlockSize: -1
18+
m_BucketAllocatorBlockCount: -1
19+
m_ProfilerBucketAllocatorGranularity: -1
20+
m_ProfilerBucketAllocatorBucketsCount: -1
21+
m_ProfilerBucketAllocatorBlockSize: -1
22+
m_ProfilerBucketAllocatorBlockCount: -1
23+
m_TempAllocatorSizeMain: -1
24+
m_JobTempAllocatorBlockSize: -1
25+
m_BackgroundJobTempAllocatorBlockSize: -1
26+
m_JobTempAllocatorReducedBlockSize: -1
27+
m_TempAllocatorSizeGIBakingWorker: -1
28+
m_TempAllocatorSizeNavMeshWorker: -1
29+
m_TempAllocatorSizeAudioWorker: -1
30+
m_TempAllocatorSizeCloudWorker: -1
31+
m_TempAllocatorSizeGfx: -1
32+
m_TempAllocatorSizeJobWorker: -1
33+
m_TempAllocatorSizeBackgroundWorker: -1
34+
m_TempAllocatorSizePreloadManager: -1
35+
m_PlatformMemorySettings: {}

0 commit comments

Comments
 (0)