aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2008-12-16 19:25:44 (GMT)
committerJouni Malinen <j@w1.fi>2008-12-16 19:25:44 (GMT)
commit64a6f69362c39e0553468b2d71f464d7bd540730 (patch)
tree80691889f5e46b1dd677e42b8d087c797cd9aa64 /wpa_supplicant
parentac5953db6694520c180fd6590179aca886b1ba17 (diff)
downloadhostap-06-64a6f69362c39e0553468b2d71f464d7bd540730.zip
hostap-06-64a6f69362c39e0553468b2d71f464d7bd540730.tar.gz
hostap-06-64a6f69362c39e0553468b2d71f464d7bd540730.tar.bz2
Use less frequent polling when wpa_gui is hidden
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/wpa_gui-qt4/wpagui.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/wpa_supplicant/wpa_gui-qt4/wpagui.cpp b/wpa_supplicant/wpa_gui-qt4/wpagui.cpp
index bd1c507..670fb6b 100644
--- a/wpa_supplicant/wpa_gui-qt4/wpagui.cpp
+++ b/wpa_supplicant/wpa_gui-qt4/wpagui.cpp
@@ -702,6 +702,14 @@ void WpaGui::ping()
updateStatus();
updateNetworks();
}
+
+#ifndef CONFIG_CTRL_IFACE_NAMED_PIPE
+ /* Use less frequent pings and status updates when the main window is
+ * hidden (running in taskbar). */
+ int interval = isHidden() ? 5000 : 1000;
+ if (timer->interval() != interval)
+ timer->setInterval(interval);
+#endif /* CONFIG_CTRL_IFACE_NAMED_PIPE */
}