Search Issue Tracker

Third Party Issue

Under Consideration for 2021.3.X, 2022.2.X, 2023.1.X, 2023.2.X

Votes

0

Found in

2021.3.26f1

2022.2.21f1

2023.1.0b19

2023.2.0a17

Issue ID

UUM-44773

Regression

No

Application.isFocused is showing Unity window still focused when unfocusing at Play Mode start

-

Reproduction steps:

1. Open the attached project “isFocused”
2. Enter Play Mode
3. Observe the Console

Expected result: Console output is that we are looking at other windows
Actual result: Console output is that we are looking at a Unity window

Reproducible with: 2021.3.26f1, 2022.2.21f1, 2023.1.0b19, 2023.2.0a17

Reproducible on: Windows 11

Not reproducible on: Mac/Linux (repro project uses P/Invoke with win32 calls)

  1. Resolution Note:

    This can occur when Windows does not get the WM_ACTIVATE message from the alt+tab on startup. This is an issue with Windows and is best described by Raymond Chen in his Microsoft blog: https://devblogs.microsoft.com/oldnewthing/?p=2913.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.