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