From 03a23ad987b1640c6d352e1b951068e6b236658e Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Fri, 4 Oct 2024 12:31:38 +0200 Subject: [PATCH] gui_fb: reset input sigh when closing the session This patch mirrors the logic already in place for the framebuffer session. --- repos/os/src/server/gui_fb/main.cc | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/repos/os/src/server/gui_fb/main.cc b/repos/os/src/server/gui_fb/main.cc index 57957d44bf..1675a7265b 100644 --- a/repos/os/src/server/gui_fb/main.cc +++ b/repos/os/src/server/gui_fb/main.cc @@ -328,7 +328,23 @@ struct Gui_fb::Main : View_updater, Input::Session_component::Action Framebuffer::Session_component _fb_session { _env.pd(), _gui, *this, _initial_mode() }; - Static_root _input_root { _input_session.cap() }; + struct Input_root : Static_root + { + Main &_main; + + Input_root(Main &main) + : + Static_root(main._input_session.cap()), + _main(main) + { } + + void close(Capability) override + { + _main._input_session.sigh(Signal_context_capability()); + } + }; + + Input_root _input_root { *this }; /* * Attach root interfaces to the entry point