*fix* stop any pending alarms if timeout is 0
git-svn-id: http://tint2.googlecode.com/svn/trunk@177 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
This commit is contained in:
parent
375b21510d
commit
7597d1b4c3
1 changed files with 6 additions and 2 deletions
|
@ -82,8 +82,10 @@ void tooltip_trigger_show(Task* task, int x_root, int y_root)
|
|||
g_tooltip.current_state = TOOLTIP_ABOUT_TO_SHOW;
|
||||
g_tooltip.task = task;
|
||||
struct timeval t = g_tooltip.show_timeout.it_value;
|
||||
if (t.tv_sec == 0 && t.tv_usec == 0)
|
||||
if (t.tv_sec == 0 && t.tv_usec == 0) {
|
||||
alarm(0);
|
||||
tooltip_show();
|
||||
}
|
||||
else
|
||||
setitimer(ITIMER_REAL, &g_tooltip.show_timeout, 0);
|
||||
}
|
||||
|
@ -229,8 +231,10 @@ void tooltip_trigger_hide(Tooltip* tooltip)
|
|||
if (g_tooltip.mapped) {
|
||||
g_tooltip.current_state = TOOLTIP_ABOUT_TO_HIDE;
|
||||
struct timeval t = g_tooltip.hide_timeout.it_value;
|
||||
if (t.tv_sec == 0 && t.tv_usec == 0)
|
||||
if (t.tv_sec == 0 && t.tv_usec == 0) {
|
||||
tooltip_hide();
|
||||
alarm(0);
|
||||
}
|
||||
else
|
||||
setitimer(ITIMER_REAL, &g_tooltip.hide_timeout, 0);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue