about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2009-12-29 01:23:32 +0100
committerhut <hut@lavabit.com>2009-12-29 01:23:32 +0100
commit11ae51f0d6206e0fed2ed3241438164a33040ea4 (patch)
treeb93ddcf9cfe943688694d080e2a092268181af0d
parente3e37e3f8cd737585799429e09159bc4dbf330c8 (diff)
downloadranger-11ae51f0d6206e0fed2ed3241438164a33040ea4.tar.gz
quick&dirty fix for correct rel/abs coordinates
-rw-r--r--ranger/gui/displayable.py4
-rw-r--r--ranger/gui/ui.py5
-rw-r--r--ranger/gui/widgets/filelist.py2
3 files changed, 6 insertions, 5 deletions
diff --git a/ranger/gui/displayable.py b/ranger/gui/displayable.py
index c4366662..30975064 100644
--- a/ranger/gui/displayable.py
+++ b/ranger/gui/displayable.py
@@ -154,8 +154,8 @@ class Displayable(EnvironmentAware, FileManagerAware, SettingsAware):
 				raise OutOfBoundsException("Resizing Failed!")
 
 		self.win.mvderwin(y, x)
-		self.absx = x
-		self.absy = y
+		self.yy, self.xx = self.win.getbegyx()
+		self.absy, self.absx = y, x
 		self.x = 0
 		self.y = 0
 		self.wid = wid
diff --git a/ranger/gui/ui.py b/ranger/gui/ui.py
index 20a263ad..91964eb1 100644
--- a/ranger/gui/ui.py
+++ b/ranger/gui/ui.py
@@ -91,8 +91,9 @@ class UI(DisplayableContainer):
 		except:
 			return
 
-		# from ranger import log
-		# log('{0:0>28b} ({0})'.format(event.bstate))
+#		from ranger import log
+#		log('{0:0>28b} ({0})'.format(event.bstate))
+#		log('y: {0}  x: {1}'.format(event.y, event.x))
 
 		if DisplayableContainer.click(self, event):
 			return
diff --git a/ranger/gui/widgets/filelist.py b/ranger/gui/widgets/filelist.py
index 08a95e18..43f3834a 100644
--- a/ranger/gui/widgets/filelist.py
+++ b/ranger/gui/widgets/filelist.py
@@ -33,7 +33,7 @@ class FileList(Widget, DisplayableContainer):
 			pass
 
 		elif self.target.type is T_DIRECTORY:
-			index = self.scroll_begin + event.y - self.y
+			index = self.scroll_begin + event.y - self.yy
 
 			if event.pressed(1):
 				if not self.main_display: