mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-03 12:34:12 +00:00
floating_window_layouter: handle config updates
update the internal representation of the config if it changes. issue #2893
This commit is contained in:
parent
6bb5b7190c
commit
0ac9d1ee31
@ -66,6 +66,9 @@ struct Floating_window_layouter::Main : Operations
|
|||||||
|
|
||||||
Genode::Attached_rom_dataspace config { env, "config" };
|
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::Heap heap { env.ram(), env.rm() };
|
||||||
|
|
||||||
Genode::Tslab<Window,4096> window_slab { &heap };
|
Genode::Tslab<Window,4096> window_slab { &heap };
|
||||||
@ -74,6 +77,11 @@ struct Floating_window_layouter::Main : Operations
|
|||||||
|
|
||||||
Focus_history focus_history;
|
Focus_history focus_history;
|
||||||
|
|
||||||
|
void handle_config()
|
||||||
|
{
|
||||||
|
config.update();
|
||||||
|
}
|
||||||
|
|
||||||
Window *lookup_window_by_id(Window_id const id)
|
Window *lookup_window_by_id(Window_id const id)
|
||||||
{
|
{
|
||||||
for (Window *w = windows.first(); w; w = w->next())
|
for (Window *w = windows.first(); w; w = w->next())
|
||||||
@ -336,6 +344,9 @@ struct Floating_window_layouter::Main : Operations
|
|||||||
|
|
||||||
/* import initial state */
|
/* import initial state */
|
||||||
handle_window_list_update();
|
handle_window_list_update();
|
||||||
|
|
||||||
|
/* attach update handler for config */
|
||||||
|
config.sigh(config_dispatcher);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user