parent
8da737acfd
commit
f19b269360
|
@ -270,8 +270,7 @@ struct Floating_window_layouter::Main : Operations
|
|||
/* read decorator margins from the decorator's report */
|
||||
unsigned top = 0, bottom = 0, left = 0, right = 0;
|
||||
try {
|
||||
Xml_node const margins_xml(decorator_margins.local_addr<char>());
|
||||
Xml_node const floating_xml = margins_xml.sub_node("floating");
|
||||
Xml_node const floating_xml = decorator_margins.xml().sub_node("floating");
|
||||
|
||||
top = attribute(floating_xml, "top", 0UL);
|
||||
bottom = attribute(floating_xml, "bottom", 0UL);
|
||||
|
@ -483,7 +482,7 @@ void Floating_window_layouter::Main::handle_window_list_update(unsigned)
|
|||
window_list.update();
|
||||
|
||||
try {
|
||||
import_window_list(Xml_node(window_list.local_addr<char>())); }
|
||||
import_window_list(window_list.xml()); }
|
||||
catch (...) {
|
||||
PERR("Error while importing window list"); }
|
||||
|
||||
|
@ -493,12 +492,10 @@ void Floating_window_layouter::Main::handle_window_list_update(unsigned)
|
|||
|
||||
void Floating_window_layouter::Main::_apply_focus_request()
|
||||
{
|
||||
try {
|
||||
Xml_node node(focus_request.local_addr<char>());
|
||||
Window::Label const label =
|
||||
focus_request.xml().attribute_value("label", Window::Label(""));
|
||||
|
||||
Window::Label const label = node.attribute_value("label", Window::Label(""));
|
||||
|
||||
int const id = node.attribute_value("id", 0L);
|
||||
int const id = focus_request.xml().attribute_value("id", 0L);
|
||||
|
||||
/* don't apply the same focus request twice */
|
||||
if (id == handled_focus_request_id)
|
||||
|
@ -542,10 +539,6 @@ void Floating_window_layouter::Main::_apply_focus_request()
|
|||
|
||||
if (focus_redefined)
|
||||
handled_focus_request_id = id;
|
||||
|
||||
}
|
||||
catch (...) {
|
||||
PERR("Error while handling focus request"); }
|
||||
}
|
||||
|
||||
|
||||
|
@ -564,18 +557,15 @@ void Floating_window_layouter::Main::handle_hover_update(unsigned)
|
|||
hover.update();
|
||||
|
||||
try {
|
||||
Xml_node const hover_xml(hover.local_addr<char>());
|
||||
Xml_node const hover_window_xml = hover_xml.sub_node("window");
|
||||
Xml_node const hover_window_xml = hover.xml().sub_node("window");
|
||||
|
||||
_user_state.hover(attribute(hover_window_xml, "id", 0UL),
|
||||
element_from_hover_model(hover_window_xml));
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* An exception may occur during the 'Xml_node' construction if the hover
|
||||
* model is missing or malformed. Under this condition, we invalidate
|
||||
* the hover state.
|
||||
* model is malformed. Under this condition, we invalidate the hover state.
|
||||
*/
|
||||
catch (...) {
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user