From 0e55119b364902e136c180772430573f9abec16e Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Fri, 20 Sep 2024 15:13:37 +0200 Subject: [PATCH] liquid_framebuffer: reset signal handlers Apply the same rationale as commit "gui_fb: reset signal handlers when closing fb" to the liquid framebuffer. --- .../src/server/liquid_framebuffer/services.cc | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/repos/demo/src/server/liquid_framebuffer/services.cc b/repos/demo/src/server/liquid_framebuffer/services.cc index 208ee1ff86..f1daa3121f 100644 --- a/repos/demo/src/server/liquid_framebuffer/services.cc +++ b/repos/demo/src/server/liquid_framebuffer/services.cc @@ -285,7 +285,27 @@ void init_services(Genode::Env &env, Input::Session_component &input_component) using namespace Genode; static Framebuffer::Session_component fb_session(env, *_window_content); - static Static_root fb_root(env.ep().manage(fb_session)); + + env.ep().manage(fb_session); + + struct Fb_root : Static_root + { + Framebuffer::Session_component &_fb_session; + + Fb_root(Framebuffer::Session_component &fb_session) + : + Static_root(fb_session.cap()), + _fb_session(fb_session) + { } + + void close(Genode::Capability) override + { + _fb_session.sync_sigh(Genode::Signal_context_capability()); + _fb_session.mode_sigh(Genode::Signal_context_capability()); + } + }; + + static Fb_root fb_root { fb_session }; static Input::Root_component input_root(env.ep().rpc_ep(), input_component);