]> Dogcows Code - chaz/tint2/blobdiff - src/tooltip/tooltip.c
revert rev 541 : we don t need to duplicate x,y
[chaz/tint2] / src / tooltip / tooltip.c
index a57883d6d11c9d04f7ca5ec1bb13747fd558a074..dd7166eb0cc4b6b7098d4187bc459bea15c33e5c 100644 (file)
@@ -80,6 +80,8 @@ void tooltip_trigger_show(Area* area, Panel* p, XEvent *e)
        // Position the tooltip in the center of the area
        x = area->posx + area->width / 2 + e->xmotion.x_root - e->xmotion.x;
        y = area->posy + area->height / 2 + e->xmotion.y_root - e->xmotion.y;
+       if (!panel_horizontal)
+               y -= height/2;
        g_tooltip.panel = p;
        if (g_tooltip.mapped && g_tooltip.area != area) {
                tooltip_copy_text(area);
@@ -134,9 +136,6 @@ void tooltip_update_geometry()
        else
                x = panel->posx - width;
 
-       if (!panel_horizontal)
-               y -= height/2;
-
        g_object_unref(layout);
        cairo_destroy(c);
        cairo_surface_destroy(cs);
This page took 0.020404 seconds and 4 git commands to generate.