mirror of
https://github.com/genodelabs/genode.git
synced 2025-03-10 14:34:38 +00:00
sculpt: always update keyboard focus after input
This patch solves keyboard-focus issues with the wifi dialog that were caused by making the focus update conditional. However, since the update is not expensive, we can unconditionally re-evaluate the focus atfer each user interaction. Issue #4820 Fixes #4856
This commit is contained in:
parent
0e3a9bfe1f
commit
f712d97763
@ -785,25 +785,13 @@ struct Sculpt::Main : Input_event_handler,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool _keyboard_input_consumed_by_sculpt_manager() const
|
|
||||||
{
|
|
||||||
return (_keyboard_focus.target == Keyboard_focus::WPA_PASSPHRASE)
|
|
||||||
|| (_system_visible && _system_dialog.keyboard_needed());
|
|
||||||
}
|
|
||||||
|
|
||||||
struct Keyboard_focus_guard
|
struct Keyboard_focus_guard
|
||||||
{
|
{
|
||||||
Main &_main;
|
Main &_main;
|
||||||
|
|
||||||
bool const _orig = _main._keyboard_input_consumed_by_sculpt_manager();
|
|
||||||
|
|
||||||
Keyboard_focus_guard(Main &main) : _main(main) { }
|
Keyboard_focus_guard(Main &main) : _main(main) { }
|
||||||
|
|
||||||
~Keyboard_focus_guard()
|
~Keyboard_focus_guard() { _main._keyboard_focus.update(); }
|
||||||
{
|
|
||||||
if (_orig != _main._keyboard_input_consumed_by_sculpt_manager())
|
|
||||||
_main._keyboard_focus.update();
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user