alexa-viewer occluding surfaces even if not displayed
Description
Environment
Attachments
- 08 Jun 2020, 11:00 PM
Activity
Walt Miner July 10, 2020 at 5:30 PM
Close for JJ RC1
Marius Vlad June 16, 2020 at 8:12 AM
Patch that sends application id events for other type of surfaces has been merged. Alexa-viewer contains now code to handle the start-up and deactivate itself.
Scott Murray June 9, 2020 at 12:21 PM
No, it seemed to work fine on my H3, window only appeared when I triggered a response from Alexa. Also, I'm okay with a new task for bounding constraints.
Marius Vlad June 9, 2020 at 8:32 AM
PS: Thanks for testing it out! Out of curiosity do you notice the issue I've described in the Jira bug?
Marius Vlad June 9, 2020 at 8:18 AM
Fyi, the x and y position is set to 0 for both, so that can be also used to move it around it. XDG shell protocol doesn't allow client position of x and y, so I've added some way to pass that information with the protocol itself. Need to adjust that in tandem with width and height (this time from QML for instance).
The hooks themselves do no alter or are not supposed to alter the internal compositor state. I've added some policy injection mechanisms, but there's no geometry being passed on with that, or any bounding boxes to match that. And that only specifies application_id, event ("show", "hide"), states ("start", "stop", "reverse") and a timeout when to execute that. Also those injection rules not modify the internal compositor state but use some from front-end APIs to handle events and states. Doesn't seem they're suited for this.
I'm leaning towards adding this in the protocol request and not with the policy engine but not really sure how do you intend to retrieve the correct dimensions to pass as a bounding box.
Assuming that there's a way to pass the geometry that you'd like be constrained to, how do you plan to get that information? For what I've seen you'll need to use the Window width and height and not the Screen's width and height to provide the area without the panels. Not really sure if that information is available before creating the surface itself. Probably can rely that information from another application but seems awkward to do.
The protocol approach can be some sort of a flag which tells the compositor -> 'please place this underneath the panels but on top of the regular application' so the client doesn't really need to know the bounding box area.
Also, I guess I can alter a bit the logic and include a shadow bounding box which comes into effect if passed in some way to the policy engine. Not really sure what would be the best way at this stage:
to do it from the hooks (seems natural, at this point, but currently there's no way to communicate that – maybe in tandem with the protocol, but see the above protocol discussion, for that might be a better way with the flags)
to do it from the policy injection rules, but that handles states and events independently, and you kind of want the bounding box be there when the client either creates the surface or it first displays it
This also seems to hijack the thread. Would like to open a new task for it if you don't mind
So this happens due to a combination of factors.
racing between which application starts first, in this case alexa-viewer is the last one
missing activate_by_default policy hook for other types of surfaces (we only have the desktop one, and it allows all of them by default)
QML file as explicitly stated visible: false
Not really sure how to solve this, I can address the second point, and in the default policy I explicitly check for alexa-viewer and will deny it – meaning that only a explicit request to activate it will actually display the surface and its content. Maybe a better approach in that hook would be go from labels to config.xml attributes (alexa-viewer has that "urn:AGL:permission::public:hidden" one), much like we've discussed about doing it when checking if the client is allowed to bind to agl-shell-desktop.
Would like to get some thoughts on the matter. CC @Scott Murray @Jan-Simon Moeller what do you think?