aboutsummaryrefslogtreecommitdiff
path: root/gui/widgets
diff options
context:
space:
mode:
authorJaromir Wysoglad2019-07-29 11:54:59 +0200
committerFilippos Karapetis2019-09-01 22:47:55 +0300
commit59631627c8e21fceeeb53b6a75853a5be6c273a7 (patch)
treed3b7a08ce7b22537b00e3e32926bed6cf5c4198b /gui/widgets
parentbac880816b0442e504833bd9eeb3d782bcdd5fac (diff)
downloadscummvm-rg350-59631627c8e21fceeeb53b6a75853a5be6c273a7.tar.gz
scummvm-rg350-59631627c8e21fceeeb53b6a75853a5be6c273a7.tar.bz2
scummvm-rg350-59631627c8e21fceeeb53b6a75853a5be6c273a7.zip
TTS: Fix reading of list widgets
The TTS read items from list widgets even when the mouse was outside the widget
Diffstat (limited to 'gui/widgets')
-rw-r--r--gui/widgets/list.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/gui/widgets/list.cpp b/gui/widgets/list.cpp
index 26edd0a4ba..0d2e9c0ef4 100644
--- a/gui/widgets/list.cpp
+++ b/gui/widgets/list.cpp
@@ -268,6 +268,10 @@ void ListWidget::handleMouseMoved(int x, int y, int button) {
if (!isEnabled())
return;
+ // Determine if we are inside the widget
+ if (x < 0 || x > _w)
+ return;
+
// First check whether the selection changed
int item = findItem(x, y);