Search Issue Tracker
Fixed in 2018.4.2f1
Fixed in 2018.4.X, 2019.1.X, 2019.2.X
Duplicate in 2018.4.X
Canvas elements are disabled in the build project when navigating in and out of Desktop by using Win + D
How to reproduce:
1. Open attached "unity_windows_freeze.zip" project
2. Build and run the project in windowed mode
3. Make sure that all other programs are minimized and press Win + D to navigate to the desktop
4. One more time press Win + D to navigate back to the program and click on a button
Expected result: The button is interactive
Actual result: The button is disabled
Reproducible: 2017.4.18f1, 2018.3.3f1, 2019.1.0a14, 2019.2.0a2
Fixed in: 2019.3.0a1
Backported to: 2018.4.2f1, 2019.1.7f1, 2019.2.0b6
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
- Input Field ignores first keyboard input when calling Focus() from code
- GC Alloc when using Graphics.RenderMeshInstanced
- [VFX Graph][URP] VFX crashes on URP when dragging VFX asset to the Hierarchy window
- InvalidOperationException when using AsyncGPUReadback.RequestIntoNativeArray
- Generated Entities look different when Depth Priming Mode is changed
Resolution Note (fix version 2018.4.2f1):
This issue is caused by yet another quirk with Win32 messages. When the WIN+D keyboard shortcut is used, a WM_ACTIVATE message is sent to the window but with fMinimized = true (since the window hasn't been restored yet). Since the Unity player is inactive (paused), whenever the window is minimized, the Activate message is essentially ignored.
This typically isn't a problem when multiple windows are present because another WM_ACTIVATE message is sent before the user interacts with the app again. However, in the case were the Unity app is the only active window when the shortcut is used, this doesn't happen and the player remains paused even after the window has been restored.
To work around this, we'll activate the player in response to a WM_SIZE with the SIZE_RESTORE parameter. That is, when the Unity window is restored, we'll also nu-pause the player if necessary.