"area": { "type": "rect", "rect": { "x": 0, "y": 218, "width": -1, "height": -433 } },
"comment": "Range of IDs that will always be placed on layer 1001, negative rect values are interpreted as output_size.dimension - $value"
},
+ {
+ "role": "^XDG$",
+ "name": "xdg-apps",
+ "layer_id": 1002,
+ "area": { "type": "rect", "rect": { "x": 0, "y": 218, "width": -1, "height": -433 } },
+ "comment": "Range of IDs dedicated for XDG apps that will always be placed on layer 1002, negative rect values are interpreted as output_size.dimension - $value"
+ },
{
"role": "^OnScreen.*",
"name": "popups",
void App::surface_created(uint32_t surface_id) {
auto layer_id = this->layers.get_layer_id(surface_id);
if (!layer_id) {
- HMI_DEBUG("wm", "Newly created surfce %d is not associated with any layer!",
+ HMI_DEBUG("wm", "Newly created surface %d is not associated with any layer! Must be a XDG apps",
surface_id);
- return;
+ auto layer_id = this->layers.get_layer_id(XDG_DRAWING_NAME);
+ if(!layer_id)
+ {
+ HMI_DEBUG("wm", "No role found for that XDG App");
+ return;
+ }
+
+ this->layers.add_surface(surface_id, *layer_id);
+ // set the main_surface[_name] here and now
+ if (!this->layers.main_surface_name.empty() &&
+ this->layers.main_surface_name == XDG_DRAWING_NAME) {
+ this->layers.main_surface = surface_id;
+ HMI_DEBUG("wm", "Set main_surface id to %u", surface_id);
+ }
}
HMI_DEBUG("wm", "surface_id is %u, layer_id is %u", surface_id, *layer_id);