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
*/
this->floating_surfaces.push_back(fsurface);
}
+void AppList::removeFloatingSurface(unsigned surface)
+{
+ for (auto itr = this->floating_surfaces.begin(); itr != this->floating_surfaces.end(); ++itr)
+ {
+ if (surface == itr->surface_id)
+ {
+ HMI_DEBUG("wm", "Erase surface %d", itr->surface_id);
+ itr = this->floating_surfaces.erase(itr);
+ break;
+ }
+ }
+}
+
WMError AppList::appendRole(const std::string &id, const std::string &role, unsigned surface)
{
WMError wm_err = WMError::NO_ENTRY;
int countClient() const;
std::shared_ptr<WMClient> lookUpClient(const std::string &appid);
void removeSurface(unsigned surface);
- WMError popFloatingSurface(unsigned pid, unsigned *surface);
- WMError popFloatingSurface(const std::string &appid, unsigned *surface);
WMError appendRole(const std::string &appid, const std::string &role, unsigned surface);
+
+ // Floating surface & client control
void addFloatingClient(const std::string &appid, unsigned layer, const std::string &role);
void addFloatingSurface(unsigned surface, unsigned pid);
+ WMError popFloatingSurface(unsigned pid, unsigned *surface);
+ WMError popFloatingSurface(const std::string &appid, unsigned *surface);
+ void removeFloatingSurface(unsigned surface);
// Request Interface
unsigned
#include "wm_client.hpp"
#include "hmi-debug.h"
-#define INVALID_SURFACE_ID 0
-
using std::string;
using std::vector;
#include <vector>
#include <string>
#include <unordered_map>
+#include "wm_error.hpp"
extern "C"
{
#ifndef WINDOW_MANAGER_ERROR
#define WINDOW_MANAGER_ERROR
+#define INVALID_SURFACE_ID 0
namespace wm {