// 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;
// 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;
int mx, my;
Window w;
XTranslateCoordinates( server.dsp, server.root_win, g_tooltip.panel->main_win, x, y, &mx, &my, &w);
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);
Panel* panel = g_tooltip.panel;
int screen_width = server.monitor[panel->monitor].x + server.monitor[panel->monitor].width;
int screen_height = server.monitor[panel->monitor].y + server.monitor[panel->monitor].height;
Panel* panel = g_tooltip.panel;
int screen_width = server.monitor[panel->monitor].x + server.monitor[panel->monitor].width;
int screen_height = server.monitor[panel->monitor].y + server.monitor[panel->monitor].height;