From: Marcus Fritzsch Date: Wed, 28 Jun 2017 14:33:53 +0000 (+0200) Subject: wayland: header order fixed, comment on controller member order X-Git-Tag: 4.99.1~288 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=commitdiff_plain;ds=inline;h=4bfc9ea5a9a5598aceb4e3e43fd2ade99d789200;hp=63c655fab3274e1319b3f52c236178e00452fe89;p=staging%2Fwindowmanager.git wayland: header order fixed, comment on controller member order Signed-off-by: Marcus Fritzsch --- diff --git a/src/wayland.hpp b/src/wayland.hpp index 3516f5e..c47e218 100644 --- a/src/wayland.hpp +++ b/src/wayland.hpp @@ -6,8 +6,8 @@ #include "util.h" #include -#include #include +#include #include // _ _ @@ -228,6 +228,13 @@ struct screen : public wayland_proxy, // \___\___/|_| |_|\__|_| \___/|_|_|\___|_| // struct controller : public wayland_proxy { + // HACK: + // The order of these member is mandatory, as when objects are destroyed + // they will call their parent (that's us right here!) and remove their + // proxy-to-id mapping. I.e. the *_proxy_to_id members need to be valid + // when the surfaces/layers/screens maps are destroyed. This sucks, but + // I cannot see a better solution w/o globals or some other horrible + // call-our-parent construct. std::unordered_map surface_proxy_to_id; std::unordered_map layer_proxy_to_id; std::unordered_map screen_proxy_to_id;