wayland: add {surface,layer}_exists(uint32_t) methods
authorMarcus Fritzsch <marcus_fritzsch@mentor.com>
Wed, 2 Aug 2017 12:13:08 +0000 (14:13 +0200)
committerMarcus Fritzsch <marcus_fritzsch@mentor.com>
Tue, 8 Aug 2017 15:24:00 +0000 (17:24 +0200)
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
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