]> Dogcows Code - chaz/tint2/blobdiff - src/tooltip/tooltip.c
fixed WM menu management
[chaz/tint2] / src / tooltip / tooltip.c
index 6826aae26e74c15e49dbc85b2ec58c174eed2a03..85ab223f2fa11f70277ef0c1c31151447ce42dd9 100644 (file)
@@ -1,6 +1,6 @@
 /**************************************************************************
 *
-* Copyright (C) 2009 Andreas.Fink85 ()
+* Copyright (C) 2009 Andreas.Fink (Andreas.Fink85@gmail.com)
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License version 2
@@ -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,11 @@ 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)
+               g_tooltip.task = 0;
+               if (t.tv_sec == 0 && t.tv_usec == 0) {
                        tooltip_hide();
+                       alarm(0);
+               }
                else
                        setitimer(ITIMER_REAL, &g_tooltip.hide_timeout, 0);
        }
@@ -247,5 +252,4 @@ void tooltip_hide()
                g_tooltip.mapped = False;
                XUnmapWindow(server.dsp, g_tooltip.window);
        }
-       g_tooltip.task = 0;
 }
This page took 0.023969 seconds and 4 git commands to generate.