]> Dogcows Code - chaz/tint2/commitdiff
Fix area lookup coordinates in tooltip_show()
authorThierry Lorthiois <lorthiois@bbsoft.fr>
Wed, 8 Jun 2011 16:57:32 +0000 (16:57 +0000)
committerThierry Lorthiois <lorthiois@bbsoft.fr>
Wed, 8 Jun 2011 16:57:32 +0000 (16:57 +0000)
src/tooltip/tooltip.c

index cf62db392d68afcd605d6002398196448766bf3d..05da0d03588a7aa9c2647431607641bf0d835af1 100644 (file)
@@ -99,7 +99,10 @@ void tooltip_show(void* arg)
        int mx, my;
        Window w;
        XTranslateCoordinates( server.dsp, server.root_win, g_tooltip.panel->main_win, x, y, &mx, &my, &w);
-       Area* area = click_area(g_tooltip.panel, mx, my);
+       Area* area;
+       if (!panel_horizontal)
+               my += height/2; /* we adjusted y in tooltip_trigger_show, revert or we won't find the correct area anymore */
+       area = click_area(g_tooltip.panel, mx, my);
        stop_tooltip_timeout();
        if (!g_tooltip.mapped && area->_get_tooltip_text) {
                tooltip_copy_text(area);
This page took 0.022192 seconds and 4 git commands to generate.