/* using std::experimental::nullopt;
using std::experimental::optional; */
-struct FloatingSurface
-{
- std::string appid;
- unsigned surface_id;
- unsigned pid;
-};
-
class AppList
{
public:
void removeSurface(unsigned surface);
std::string getAppID(unsigned surface, bool* found) const; // TODO: remove
-
- // Floating surface
- void addFloatingClient(const std::string &appid, unsigned layer, const std::string &role);
- void addFloatingSurface(const std::string &appid, 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 currentRequestNumber() const;
unsigned getRequestNumber(const std::string &appid) const;
void clientDump();
void reqDump();
- void dumpFloatingSurfaces();
private:
std::vector<WMRequest> req_list;
std::unordered_map<std::string, std::shared_ptr<WMClient>> app2client;
unsigned current_req;
std::mutex mtx;
- std::vector<struct FloatingSurface> floating_surfaces;
};
} // namespace wm