floating_window_layouter: handle config updates

update the internal representation of the config if it changes.

issue #2893
This commit is contained in:
Pirmin Duss 2018-06-29 10:34:18 +02:00 committed by Christian Helmuth
parent 6bb5b7190c
commit 0ac9d1ee31

View File

@ -66,6 +66,9 @@ struct Floating_window_layouter::Main : Operations
Genode::Attached_rom_dataspace config { env, "config" };
Genode::Signal_handler<Main> config_dispatcher {
env.ep(), *this, &Main::handle_config };
Genode::Heap heap { env.ram(), env.rm() };
Genode::Tslab<Window,4096> window_slab { &heap };
@ -74,6 +77,11 @@ struct Floating_window_layouter::Main : Operations
Focus_history focus_history;
void handle_config()
{
config.update();
}
Window *lookup_window_by_id(Window_id const id)
{
for (Window *w = windows.first(); w; w = w->next())
@ -336,6 +344,9 @@ struct Floating_window_layouter::Main : Operations
/* import initial state */
handle_window_list_update();
/* attach update handler for config */
config.sigh(config_dispatcher);
}
};