mirror of
https://github.com/genodelabs/genode.git
synced 2025-03-15 00:36:34 +00: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:
parent
3600705a2f
commit
e27d0d36fa
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user