mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-08 11:55:24 +00:00
themed_decorator: use Attached_rom_dataspace::xml
This simplifies the code a bit.
This commit is contained in:
parent
dec2d897c3
commit
070a24956d
@ -261,33 +261,18 @@ void Decorator::Main::_handle_nitpicker_sync()
|
||||
auto flush_window_stack_changes = [&] () {
|
||||
_window_stack.update_nitpicker_views(); };
|
||||
|
||||
if (_window_layout_update_needed && _window_layout.valid()) {
|
||||
if (_window_layout_update_needed) {
|
||||
|
||||
try {
|
||||
Xml_node xml(_window_layout.local_addr<char>(),
|
||||
_window_layout.size());
|
||||
_window_stack.update_model(_window_layout.xml(), flush_window_stack_changes);
|
||||
|
||||
_window_stack.update_model(xml, flush_window_stack_changes);
|
||||
model_updated = true;
|
||||
|
||||
model_updated = true;
|
||||
|
||||
/*
|
||||
* A decorator element might have appeared or disappeared under
|
||||
* the pointer.
|
||||
*/
|
||||
if (_pointer.constructed() && _pointer->valid())
|
||||
update_hover_report(Xml_node(_pointer->local_addr<char>()),
|
||||
_window_stack, _hover, _hover_reporter);
|
||||
|
||||
} catch (Xml_node::Invalid_syntax) {
|
||||
|
||||
/*
|
||||
* An error occured with processing the XML model. Flush the
|
||||
* internal representation.
|
||||
*/
|
||||
_window_stack.update_model(Xml_node("<window_layout/>"),
|
||||
flush_window_stack_changes);
|
||||
}
|
||||
/*
|
||||
* A decorator element might have appeared or disappeared under
|
||||
* the pointer.
|
||||
*/
|
||||
if (_pointer.constructed())
|
||||
update_hover_report(_pointer->xml(), _window_stack, _hover, _hover_reporter);
|
||||
|
||||
_window_layout_update_needed = false;
|
||||
}
|
||||
@ -317,9 +302,7 @@ void Decorator::Main::_handle_pointer_update()
|
||||
|
||||
_pointer->update();
|
||||
|
||||
if (_pointer->valid())
|
||||
update_hover_report(Xml_node(_pointer->local_addr<char>()),
|
||||
_window_stack, _hover, _hover_reporter);
|
||||
update_hover_report(_pointer->xml(), _window_stack, _hover, _hover_reporter);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user