diff --git a/repos/gems/src/app/window_layouter/main.cc b/repos/gems/src/app/window_layouter/main.cc index bd6092f530..25a09d70f3 100644 --- a/repos/gems/src/app/window_layouter/main.cc +++ b/repos/gems/src/app/window_layouter/main.cc @@ -549,6 +549,8 @@ void Window_layouter::Main::_handle_hover() { _hover.update(); + User_state::Hover_state const orig_hover_state = _user_state.hover_state(); + try { Xml_node const hover_window_xml = _hover.xml().sub_node("window"); @@ -573,8 +575,15 @@ void Window_layouter::Main::_handle_hover() */ } - /* propagate changed hovering to the decorator */ - _gen_window_layout(); + /* + * Propagate changed hovering to the decorator + * + * Should a decorator issue a hover update with the unchanged information, + * avoid triggering a superfluous window-layout update. This can happen in + * corner cases such as the completion of a window-drag operation. + */ + if (_user_state.hover_state() != orig_hover_state) + _gen_window_layout(); } diff --git a/repos/gems/src/app/window_layouter/user_state.h b/repos/gems/src/app/window_layouter/user_state.h index 0a1aef1d14..a28edde4e2 100644 --- a/repos/gems/src/app/window_layouter/user_state.h +++ b/repos/gems/src/app/window_layouter/user_state.h @@ -34,6 +34,12 @@ class Window_layouter::User_state : window_id(id), element(element) { } + + bool operator != (Hover_state const &other) const + { + return window_id != other.window_id + || element != other.element; + } }; private: