mirror of
https://github.com/mmueller41/genode.git
synced 2026-01-21 20:42:56 +01:00
wm: revoke curr focus if new focus is undefined
This allows the window layouter to ensure that input entered after switching to an empty screen won't be routed to the old focused but no longer visible window. Issue #5390
This commit is contained in:
@@ -79,10 +79,14 @@ struct Wm::Main : Pointer::Tracker, Gui::Session_component::Action
|
||||
{
|
||||
_gui_root.revoke_exclusive_input();
|
||||
_focus_rom.update();
|
||||
bool defined = false;
|
||||
_focus_rom.xml().with_optional_sub_node("window", [&] (Xml_node const &window) {
|
||||
_with_win_id_from_xml(window, [&] (Window_registry::Id id) {
|
||||
_gui_root.with_gui_session(id, [&] (Capability<Gui::Session> cap) {
|
||||
_focus_gui_session.focus(cap); }); }); });
|
||||
_focus_gui_session.focus(cap);
|
||||
defined = true; }); }); });
|
||||
if (!defined)
|
||||
_focus_gui_session.focus({ });
|
||||
}
|
||||
|
||||
Signal_handler<Main> _focus_handler {
|
||||
|
||||
Reference in New Issue
Block a user