about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2009-12-28 23:52:39 +0100
committerhut <hut@lavabit.com>2009-12-28 23:52:39 +0100
commit3e092587bbcd5d8123a323884cb03b54747005e4 (patch)
tree909b220a94b306d2d4be8d7ddc15690662d13d0b
parent975028d45f2356f6947144a0da1ce280c381c836 (diff)
downloadranger-3e092587bbcd5d8123a323884cb03b54747005e4.tar.gz
fixed "(y, x) in widget"
-rw-r--r--ranger/gui/displayable.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/ranger/gui/displayable.py b/ranger/gui/displayable.py
index e876927b..c4366662 100644
--- a/ranger/gui/displayable.py
+++ b/ranger/gui/displayable.py
@@ -72,9 +72,12 @@ class Displayable(EnvironmentAware, FileManagerAware, SettingsAware):
 		"""
 
 	def contains_point(self, y, x):
-		"""Test if the point lies within the boundaries of this object"""
-		return (x >= self.x and x < self.x + self.wid) and \
-				(y >= self.y and y < self.y + self.hei)
+		"""
+		Test whether the point (with absolute coordinates) lies
+		within the boundaries of this object.
+		"""
+		return (x >= self.absx and x < self.absx + self.wid) and \
+				(y >= self.absy and y < self.absy + self.hei)
 
 	def click(self, event):
 		"""Called when a mouse key is pressed and self.focused is True.