diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/wayland.hpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/wayland.hpp b/src/wayland.hpp index 44f6cb4..da3cc29 100644 --- a/src/wayland.hpp +++ b/src/wayland.hpp @@ -257,8 +257,13 @@ struct layer : public wayland_proxy<struct ivi_controller_layer>, ivi_controller_layer_remove_surface(this->proxy, surface->proxy); } - inline void set_render_order(struct wl_array *surfaces) { - ivi_controller_layer_set_render_order(this->proxy, surfaces); + void set_render_order(std::vector<uint32_t> const &ro) { + struct wl_array wlro{ + .size = ro.size() * sizeof(ro[0]), + .alloc = ro.capacity() * sizeof(ro[0]), + .data = const_cast<void *>(static_cast<void const *>(ro.data())) + }; + ivi_controller_layer_set_render_order(this->proxy, &wlro); } }; @@ -276,6 +281,14 @@ struct screen : public wayland_proxy<struct ivi_controller_screen>, void add_layer(layer *l) { ivi_controller_screen_add_layer(this->proxy, l->proxy); } + void set_render_order(std::vector<uint32_t> const &ro) { + struct wl_array wlro{ + .size = ro.size() * sizeof(ro[0]), + .alloc = ro.capacity() * sizeof(ro[0]), + .data = const_cast<void *>(static_cast<void const *>(ro.data())) + }; + ivi_controller_screen_set_render_order(this->proxy, &wlro); + } }; // _ _ _ |