X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Ftooltip%2Ftooltip.c;h=cf62db392d68afcd605d6002398196448766bf3d;hb=a72ae04bf96477f11d8bf24baea54596f6d3356b;hp=dd7166eb0cc4b6b7098d4187bc459bea15c33e5c;hpb=39e76e43d441ad2d066339ba47e07e77bda249bc;p=chaz%2Ftint2 diff --git a/src/tooltip/tooltip.c b/src/tooltip/tooltip.c index dd7166e..cf62db3 100644 --- a/src/tooltip/tooltip.c +++ b/src/tooltip/tooltip.c @@ -151,22 +151,22 @@ void tooltip_adjust_geometry() 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; - if ( x+width <= screen_width && y+height <= screen_height && x>=0 && y>=0) + if ( x+width <= screen_width && y+height <= screen_height && x>=server.monitor[panel->monitor].x && y>=server.monitor[panel->monitor].y ) return; // no adjustment needed if (panel_horizontal) { min_x=0; - max_width=screen_width; - max_height=screen_height-panel->area.height; + max_width=server.monitor[panel->monitor].width; + max_height=server.monitor[panel->monitor].height-panel->area.height; if (panel_position & BOTTOM) min_y=0; else min_y=panel->area.height; } else { - max_width=screen_width-panel->area.width; + max_width=server.monitor[panel->monitor].width-panel->area.width; min_y=0; - max_height=screen_height; + max_height=server.monitor[panel->monitor].height; if (panel_position & LEFT) min_x=panel->area.width; else