From 6c6b19b19801bb98ea7cde9ab23b21a7c33f6936 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Tue, 26 Jun 2018 14:21:42 +0200 Subject: [PATCH] sculpt: yield focus when switching away from Wifi When first selecting an access point to connect to, and then - while the passphrase entry field is displayed - switching to wired networking, the keyboard focus was still referring to the passphrase entry field instead of yieling the focus to the inspect window. This commit fixes the problem by adding the wifi NIC target as additional condition. --- repos/gems/src/app/sculpt_manager/view/network_dialog.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/repos/gems/src/app/sculpt_manager/view/network_dialog.cc b/repos/gems/src/app/sculpt_manager/view/network_dialog.cc index bce0bc826b..ce40a439c6 100644 --- a/repos/gems/src/app/sculpt_manager/view/network_dialog.cc +++ b/repos/gems/src/app/sculpt_manager/view/network_dialog.cc @@ -78,6 +78,9 @@ bool Sculpt::Network_dialog::need_keyboard_focus_for_passphrase() const if (_wifi_connection.state == Wifi_connection::CONNECTED) return false; + if (!_nic_target.wifi()) + return false; + return _for_each_ap([&] (Access_point const &ap) { return _ap_item.selected(ap.bssid) && ap.wpa_protected(); }); }