aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/Menu.cc
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2012-08-28 08:51:55 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2012-08-28 08:51:55 (GMT)
commit541c8c407b7ba8dd10f85bb48bcb5900270b3f84 (patch)
tree71a6abc0f2a43bcfd33f80b3b30b878f234cbf05 /src/FbTk/Menu.cc
parent60a53113e05db443af4d520883ec3145680642a8 (diff)
downloadfluxbox-541c8c407b7ba8dd10f85bb48bcb5900270b3f84.zip
fluxbox-541c8c407b7ba8dd10f85bb48bcb5900270b3f84.tar.bz2
changed timing functions to use a monotonic increasing clock
gettimeofday() is subject to be changed on daylight-saving or to ntp-related (think leap-seconds). even worse, it is subject to be changed BACK in time. this is hard to fix correctly (see commit 45726d3016e and bug #3560509). it is irrelevant for timers to know the nano-seconds since the epoch anyways.
Diffstat (limited to 'src/FbTk/Menu.cc')
-rw-r--r--src/FbTk/Menu.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc
index a66b6c0..3632fc9 100644
--- a/src/FbTk/Menu.cc
+++ b/src/FbTk/Menu.cc
@@ -1006,7 +1006,7 @@ void Menu::motionNotifyEvent(XMotionEvent &me) {
1006 } 1006 }
1007 1007
1008 if (itmp->submenu()) { // start submenu open delay 1008 if (itmp->submenu()) { // start submenu open delay
1009 m_submenu_timer.setTimeout(theme()->getDelay()); 1009 m_submenu_timer.setTimeout(theme()->getDelay() * FbTk::FbTime::IN_MILLISECONDS);
1010 m_submenu_timer.start(); 1010 m_submenu_timer.start();
1011 } else if (isItemSelectable(w)){ 1011 } else if (isItemSelectable(w)){
1012 // else normal menu item 1012 // else normal menu item
@@ -1225,7 +1225,7 @@ void Menu::closeMenu() {
1225} 1225}
1226 1226
1227void Menu::startHide() { 1227void Menu::startHide() {
1228 m_hide_timer.setTimeout(theme()->getDelay()); 1228 m_hide_timer.setTimeout(theme()->getDelay() * FbTk::FbTime::IN_MILLISECONDS);
1229 m_hide_timer.start(); 1229 m_hide_timer.start();
1230} 1230}
1231 1231