Skip to content
Commit 03df85e0 authored by chaviw's avatar chaviw
Browse files

Set focus to WMS computed focus when embedded window drops focus

If an internal system window wants to drop focus from an embedded
window, requestFocusTransfer doesn't need to be called and instead we
can directly call setFocusedWindow. This fixes the case where transfer
focus fails if the old focused window loses visibility by the time the
transfer request arrives. The transfer won't be allowed because the old
window isn't focused anymore so we can't honor the transfer request.

This fix is fine for internal system windows because there's no security
issue with transferring focus from embedded to something WMS computes.
However, there's still a race condition for cases where apps want to
transfer focus from embedded back to host when they are setting
visibility on the embedded window since the embedded window can become
invisible before the transfer goes through.

Test: Pip Menu focus lost
Fixes: 230851770
Change-Id: I09db0bbdf4db6eeaffa30275233811b13ea31132
parent e69a969f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment