aboutsummaryrefslogtreecommitdiff
path: root/gui/Tooltip.cpp
diff options
context:
space:
mode:
authorTorbjörn Andersson2015-03-21 17:41:44 +0100
committerTorbjörn Andersson2015-03-21 17:45:05 +0100
commitc37d4af516b65771b1580ac8cbb03759d04f00c2 (patch)
treeecd50ddb285ca8d2d97d56a2f687f5504a56c8d9 /gui/Tooltip.cpp
parent16ba21259b2aaf3b9ee9acae2e0aba95df1dea36 (diff)
downloadscummvm-rg350-c37d4af516b65771b1580ac8cbb03759d04f00c2.tar.gz
scummvm-rg350-c37d4af516b65771b1580ac8cbb03759d04f00c2.tar.bz2
scummvm-rg350-c37d4af516b65771b1580ac8cbb03759d04f00c2.zip
GUI: Fix bug #6813, "GUI: Tooltips eat keypresses"
The tooltip isn't really interested in any keyboard and mouse events, other than as a signal to close itself, so pass them back to the parent dialog. From what I understand, the tooltip isn't part of the dialog, so there should be no risk of going into an infinite loop here.
Diffstat (limited to 'gui/Tooltip.cpp')
-rw-r--r--gui/Tooltip.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/gui/Tooltip.cpp b/gui/Tooltip.cpp
index e5f06bcafe..ba313ee34f 100644
--- a/gui/Tooltip.cpp
+++ b/gui/Tooltip.cpp
@@ -40,6 +40,8 @@ Tooltip::Tooltip() :
void Tooltip::setup(Dialog *parent, Widget *widget, int x, int y) {
assert(widget->hasTooltip());
+ _parent = parent;
+
_maxWidth = g_gui.xmlEval()->getVar("Globals.Tooltip.MaxWidth", 100);
_xdelta = g_gui.xmlEval()->getVar("Globals.Tooltip.XDelta", 0);
_ydelta = g_gui.xmlEval()->getVar("Globals.Tooltip.YDelta", 0);