changeset 365:d6a729e3c31d

all windows appear on current desktop
author Drew Perttula <drewp@bigasterisk.com>
date Fri, 15 Jun 2007 16:51:26 +0000
parents 9a03605121b7
children 430014be95ce
files light9/uihelpers.py
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/light9/uihelpers.py	Fri Jun 15 16:51:14 2007 +0000
+++ b/light9/uihelpers.py	Fri Jun 15 16:51:26 2007 +0000
@@ -49,12 +49,19 @@
         pass
 
     if name in windowlocations:
-        tl.geometry(windowlocations[name])
+        tl.geometry(positionOnCurrentDesktop(windowlocations[name]))
 
     tl._toplevelat_funcid = tl.bind("<Configure>",lambda ev,tl=tl,name=name: toplevel_savegeometry(tl,name))
 
     return tl
 
+def positionOnCurrentDesktop(xform, screenWidth=1920, screenHeight=1440):
+    size, x, y = xform.split('+')
+    x = int(x) % 1920
+    y = int(y) % 1440
+    return "%s+%s+%s" % (size, x, y)
+    
+
 def toggle_slider(s):
     if s.get() == 0:
         s.set(100)