diff --git a/repos/os/src/server/gui_fb/main.cc b/repos/os/src/server/gui_fb/main.cc index db02a179cb..ac9fd2d420 100644 --- a/repos/os/src/server/gui_fb/main.cc +++ b/repos/os/src/server/gui_fb/main.cc @@ -289,11 +289,30 @@ struct Nit_fb::Main : View_updater Input::Session_component input_session { env, env.ram() }; Framebuffer::Session_component fb_session { env.pd(), gui, *this, _initial_mode() }; + Static_root input_root { env.ep().manage(input_session) }; + /* * Attach root interfaces to the entry point */ - Static_root input_root { env.ep().manage(input_session) }; - Static_root fb_root { env.ep().manage(fb_session) }; + + struct Fb_root : Static_root + { + Main &_main; + + Fb_root(Main &main) + : + Static_root(main.env.ep().manage(main.fb_session)), + _main(main) + { } + + void close(Genode::Capability) override + { + _main.fb_session.sync_sigh(Genode::Signal_context_capability()); + _main.fb_session.mode_sigh(Genode::Signal_context_capability()); + } + }; + + Fb_root fb_root { *this }; /** * View_updater interface