From 37e0c7ece76d2fdc23a42f87f9112ec1423dd988 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sun, 15 Nov 2020 15:42:14 +0100 Subject: Make sure tooltips are always shown inside the window. --- plugingui/tooltip.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'plugingui/tooltip.cc') diff --git a/plugingui/tooltip.cc b/plugingui/tooltip.cc index 19bc89b..e251ed5 100644 --- a/plugingui/tooltip.cc +++ b/plugingui/tooltip.cc @@ -177,6 +177,10 @@ void Tooltip::show() y += activating_widget->height(); } + // Make sure the tip is displayed inside the window + x = std::max(x, 0); + y = std::max(y, 0); + move(x, y); Widget::show(); -- cgit v1.2.3