#include <regex>
#include <thread>
-#include "wm-client.hpp"
+#include "wm_client.hpp"
extern "C"
auto client = app_list->lookUpClient(id);
+ unsigned srfc = client->surfaceID(role);
+ if(srfc != INVALID_SURFACE_ID){
+ // remove floating surface
+ app_list->removeFloatingSurface(client->surfaceID(role));
+ }
/*
* Queueing Phase
*/
*/
void App::surface_created(uint32_t surface_id)
{
+ // For set role function
+ HMI_DEBUG("wm", "Get surface pid");
+ this->controller->get_surface_properties(surface_id);
+
auto layer_id = this->layers.get_layer_id(surface_id);
if (!layer_id)
{
app_list->removeSurface(surface_id);
}
+void App::surface_properties(unsigned surface_id, unsigned pid)
+{
+ HMI_DEBUG("wm", "get surface properties");
+ this->app_list->addFloatingSurface(surface_id, pid);
+}
+
void App::emit_activated(char const *label)
{
this->send_event(kListEventName[Event_Active], label);
if(0 != pid){
// search floating surfaceID from pid if pid is designated.
// It is not good that application request with its pid
- wm_err = app_list->lookUpFloatingSurface(pid, &surface);
+ wm_err = app_list->popFloatingSurface(pid, &surface);
}
else{
// get floating surface with appid. If WM queries appid from pid,
// WM can bind surface and role with appid(not implemented yet)
- //wm_err = app_list->lookUpFloatingSurface(id);
+ //wm_err = app_list->popFloatingSurface(id);
}
if(wm_err != WMError::SUCCESS){
HMI_ERROR("wm", "No floating surface for app: %s", id.c_str());
this->app->surface_removed(surface_id);
}
+void controller_hooks::surface_properties(uint32_t surface_id, uint32_t pid)
+{
+ this->app->surface_properties(surface_id, pid);
+}
+
void controller_hooks::surface_visibility(uint32_t /*surface_id*/,
uint32_t /*v*/) {}