Tweak things to center the window
Add a onCompleted hook in Main.qml to set it's x and y coordinates to
center the window, and rework instantiation of the qml in main.cpp so
that the resulting x and y values can be queried and used in a call to
set_window_props to actually position the window.
Bug-AGL: SPEC-3784
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Change-Id: I46e2dfac7c62c9afd379fd6bf7b7fa3277422cbc
(cherry picked from commit
b587bf9d453f29656c2a52bc486881c0e3cb67c6)
app: Re-work the deactivation part in application_id_state event
In commit
11b9762f115778 we've added some logic in place that would
allow to start the application de-activated (that is hidden), as to
avoid 'stealing' the input focus (hoovering the pointer over a surface
will give that surface focus).
alexa-viewer application would be started by default by the system and
will be set 'invisible' (due to being a Qt app with the property set as
visible: false), and most likely this might cause a bit
of confusion for users. Also, by default, the compositor will display
the application as soon as started.
This patch re-works the de-activation part to handle a corner case, as
in commit
11b9762f115778 we would send the de-activate request as a
response in an event handler but it seems we can't guarantee that at that
time the surface was indeed activated.
So, 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.
Bug-AGL: SPEC-3412
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ie50b8011700d258a899374176fb78dcd528f88c1