mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-19 03:06:39 +00:00
parent
658091bfad
commit
28714979bd
@ -55,8 +55,6 @@ install_config {
|
||||
<config verbose="no">
|
||||
<policy label="leitzentrale_config -> leitzentrale"
|
||||
report="global_keys_handler -> leitzentrale"/>
|
||||
<policy label="leitzentrale -> manager -> nitpicker_hover"
|
||||
report="nitpicker -> hover"/>
|
||||
<policy label="pointer -> hover" report="nitpicker -> hover"/>
|
||||
<policy label="pointer -> xray"
|
||||
report="global_keys_handler -> leitzentrale"/>
|
||||
|
@ -229,7 +229,6 @@
|
||||
<service name="Report" label="depot_query">
|
||||
<child name="config_fs_report" label="managed -> depot_query"/> </service>
|
||||
<service name="Report"> <child name="report_rom"/> </service>
|
||||
<service name="ROM" label="nitpicker_hover"> <parent/> </service>
|
||||
<service name="ROM" label_prefix="report ->"> <parent/> </service>
|
||||
<service name="ROM" label_suffix="_hover"> <child name="report_rom"/> </service>
|
||||
<service name="ROM" label="window_list"> <child name="report_rom"/> </service>
|
||||
|
@ -116,13 +116,6 @@ struct Sculpt::Main : Input_event_handler,
|
||||
_event_filter_config.try_generate_manually_managed();
|
||||
}
|
||||
|
||||
Attached_rom_dataspace _gui_hover { _env, "nitpicker_hover" };
|
||||
|
||||
Signal_handler<Main> _gui_hover_handler {
|
||||
_env.ep(), *this, &Main::_handle_gui_hover };
|
||||
|
||||
void _handle_gui_hover();
|
||||
|
||||
|
||||
/**********************
|
||||
** Device discovery **
|
||||
@ -1036,7 +1029,6 @@ struct Sculpt::Main : Input_event_handler,
|
||||
* Subscribe to reports
|
||||
*/
|
||||
_update_state_rom .sigh(_update_state_handler);
|
||||
_gui_hover .sigh(_gui_hover_handler);
|
||||
_pci_devices .sigh(_pci_devices_handler);
|
||||
_window_list .sigh(_window_list_handler);
|
||||
_decorator_margins .sigh(_decorator_margins_handler);
|
||||
@ -1382,29 +1374,6 @@ Sculpt::Dialog::Hover_result Sculpt::Main::hover(Xml_node hover)
|
||||
}
|
||||
|
||||
|
||||
void Sculpt::Main::_handle_gui_hover()
|
||||
{
|
||||
if (!_storage._discovery_state.discovery_in_progress())
|
||||
return;
|
||||
|
||||
/* check if initial user activity has already been evaluated */
|
||||
if (_storage._discovery_state.user_state != Discovery_state::USER_UNKNOWN)
|
||||
return;
|
||||
|
||||
_gui_hover.update();
|
||||
Xml_node const hover = _gui_hover.xml();
|
||||
if (!hover.has_type("hover"))
|
||||
return;
|
||||
|
||||
_storage._discovery_state.user_state = hover.attribute_value("active", false)
|
||||
? Discovery_state::USER_INTERVENED
|
||||
: Discovery_state::USER_IDLE;
|
||||
|
||||
/* trigger re-evaluation of default storage target */
|
||||
_storage.handle_storage_devices_update();
|
||||
}
|
||||
|
||||
|
||||
void Sculpt::Main::_handle_update_state()
|
||||
{
|
||||
_update_state_rom.update();
|
||||
|
@ -26,10 +26,6 @@ namespace Sculpt { struct Discovery_state; }
|
||||
|
||||
struct Sculpt::Discovery_state
|
||||
{
|
||||
enum User_state { USER_UNKNOWN, USER_IDLE, USER_INTERVENED };
|
||||
|
||||
User_state user_state { USER_UNKNOWN };
|
||||
|
||||
bool _done = false;
|
||||
|
||||
bool discovery_in_progress() const { return !_done; }
|
||||
@ -40,15 +36,6 @@ struct Sculpt::Discovery_state
|
||||
if (_done)
|
||||
return Storage_target { };
|
||||
|
||||
/* user intervention disarms the built-in selection policy */
|
||||
if (user_state == USER_UNKNOWN)
|
||||
return Storage_target { };
|
||||
|
||||
if (user_state == USER_INTERVENED) {
|
||||
_done = true;
|
||||
return Storage_target { };
|
||||
}
|
||||
|
||||
/* defer decision until the low-level device enumeration is complete */
|
||||
if (!devices.all_devices_enumerated())
|
||||
return Storage_target { };
|
||||
|
Loading…
Reference in New Issue
Block a user