app: Re-work the deactivation part in application_id_state event 01/24901/1 sandbox/mvlad/re-work-deactivate
authorMarius Vlad <marius.vlad@collabora.com>
Sat, 27 Jun 2020 15:20:19 +0000 (18:20 +0300)
committerMarius Vlad <marius.vlad@collabora.com>
Mon, 29 Jun 2020 18:57:08 +0000 (21:57 +0300)
commit08801ed1fb6424b61f27769b38eb1806b3732b13
tree060896dd1f8a4484caf267afe0adf539d68864cd
parent40e6e78a19483dc5822ded81cea041f3983a877f
app: Re-work the deactivation part in application_id_state event

In commit 11b9762f115778 we added some logic that we would've
started the application application when first started as de-activated,
avoiding 'stealing' the input focus.

But in some cases, the compositor will activate the pop-up by default a
bit a later, after the application sent out the de-activate request,
effectively nullifying the outcome.

Instead of using application_id event, we use the application_id_state
event, which guarantees that we were actually sending the de-activate
request after we got the activate state event from the compositor to
perform the above.

Bug-AGL: SPEC-3412

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ie50b8011700d258a899374176fb78dcd528f88c1
app/main.cpp