diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2020-11-15 15:42:14 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2020-11-15 15:42:14 +0100 |
commit | 37e0c7ece76d2fdc23a42f87f9112ec1423dd988 (patch) | |
tree | 9d52181de738cf69784f017e8975ac39b790eccc /plugingui/tooltip.cc | |
parent | a8eea6e9c1f32d5562594656c68dc4b9f985b790 (diff) |
Make sure tooltips are always shown inside the window.
Diffstat (limited to 'plugingui/tooltip.cc')
-rw-r--r-- | plugingui/tooltip.cc | 4 |
1 files changed, 4 insertions, 0 deletions
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(); |