From abce581863a5dc331d511f020d41430fc3cc905b Mon Sep 17 00:00:00 2001 From: pelya Date: Sun, 26 Mar 2017 00:31:46 +0200 Subject: [PATCH] Tooltip will hide itself in no-titlebar mode --- src/misc_gui.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp index 6072adb29d..951dfdd943 100644 --- a/src/misc_gui.cpp +++ b/src/misc_gui.cpp @@ -693,10 +693,12 @@ struct TooltipsWindow : public Window if (pt.y + sm_height > scr_bot) pt.y = min(_cursor.pos.y + _cursor.total_offs.y - 5, scr_bot) - sm_height; pt.x = sm_width >= _screen.width ? 0 : Clamp(_cursor.pos.x - (sm_width >> 1), 0, _screen.width - sm_width); - // Move it to the top of the screen, away from mouse cursor, so it won't steal screen taps on Android - pt.y = GetMainViewTop(); - if (_cursor.pos.y < pt.y + GetMinSizing(NWST_STEP)) { - pt.x = _cursor.pos.x > _screen.width / 2 ? GetMinSizing(NWST_STEP) : _screen.width - sm_width - GetMinSizing(NWST_STEP); + if (_settings_client.gui.windows_titlebars) { + // Move it to the top of the screen, away from mouse cursor, so it won't steal screen taps on Android + pt.y = GetMainViewTop(); + if (_cursor.pos.y < pt.y + GetMinSizing(NWST_STEP)) { + pt.x = _cursor.pos.x > _screen.width / 2 ? GetMinSizing(NWST_STEP) : _screen.width - sm_width - GetMinSizing(NWST_STEP); + } } return pt;