bugfix: submenus didn't hide if a delay was set
use the FbTk::Timer API correctly, bug(s) introduced by1f0adef4da
e685117941
This commit is contained in:
parent
798ecb88d5
commit
d2e7feaa85
2 changed files with 3 additions and 3 deletions
|
@ -82,7 +82,7 @@ void AttentionNoticeHandler::addAttention(Focusable &client) {
|
||||||
RefCount<Command<void> > cmd(new ToggleFrameFocusCmd(client));
|
RefCount<Command<void> > cmd(new ToggleFrameFocusCmd(client));
|
||||||
Timer *timer = new Timer();
|
Timer *timer = new Timer();
|
||||||
timer->setCommand(cmd);
|
timer->setCommand(cmd);
|
||||||
timer->setTimeout(0, **timeout_res * 1000);
|
timer->setTimeout(**timeout_res);
|
||||||
timer->fireOnce(false); // will repeat until window has focus
|
timer->fireOnce(false); // will repeat until window has focus
|
||||||
timer->start();
|
timer->start();
|
||||||
|
|
||||||
|
|
|
@ -1002,7 +1002,7 @@ void Menu::motionNotifyEvent(XMotionEvent &me) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (itmp->submenu()) { // start submenu open delay
|
if (itmp->submenu()) { // start submenu open delay
|
||||||
m_submenu_timer.setTimeout(0, theme()->getDelay() * 1000);
|
m_submenu_timer.setTimeout(theme()->getDelay());
|
||||||
m_submenu_timer.start();
|
m_submenu_timer.start();
|
||||||
} else if (isItemSelectable(w)){
|
} else if (isItemSelectable(w)){
|
||||||
// else normal menu item
|
// else normal menu item
|
||||||
|
@ -1221,7 +1221,7 @@ void Menu::closeMenu() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Menu::startHide() {
|
void Menu::startHide() {
|
||||||
m_hide_timer.setTimeout(theme()->getDelay() * 1000);
|
m_hide_timer.setTimeout(theme()->getDelay());
|
||||||
m_hide_timer.start();
|
m_hide_timer.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue