wayland: add {surface,layer}_exists(uint32_t) methods
[staging/windowmanager.git] / src / wayland.hpp
index b0b3674..4191ea0 100644 (file)
@@ -298,6 +298,15 @@ struct controller : public wayland_proxy<struct ivi_controller> {
                  std::function<void(struct controller *)> &&f);
    void execute_pending();
 
+
+   bool surface_exists(uint32_t id) const {
+      return this->surfaces.find(id) != this->surfaces.end();
+   }
+
+   bool layer_exists(uint32_t id) const {
+      return this->layers.find(id) != this->layers.end();
+   }
+
    controller(struct wl_registry *r, uint32_t name, uint32_t version);
 
    // Requests