This fixes the 'goto_multihead' script from the scripts collection
under the latest 2006-10-29 snapshot.

Jason

--- /usr/share/ion3/goto_multihead.lua  2006-05-24 13:04:59.000000000 -0400
+++ goto_multihead.lua  2006-11-06 13:10:14.000000000 -0500
@@ -1,18 +1,18 @@
--- A version of WIonWS.goto_dir that may be useful on multihead setups
--- Replace WIonWS.goto_dir with goto_multihead.goto_dir in cfg_ionws.lua
+-- A version of ioncore.goto_next that may be useful on multihead setups
+-- Replace ioncore.goto_next with goto_multihead.goto_next in cfg_tiling.lua
 -- to use it.
 
 goto_multihead={}
 
-function goto_multihead.goto_dir(ws, dir)
+function goto_multihead.goto_next(ws, dir)
     if dir=="up" or dir=="down" then
-        ws:goto_dir(dir)
+        ioncore.goto_next(ws:current(), dir)
         return
     end
     
     local nxt, nxtscr
     
-    nxt=ws:nextto(ws:current(), dir)
+    nxt=ioncore.navi_next(ws:current(), dir, {nowrap=true})
     
     if not nxt then
         local otherdir
@@ -24,8 +24,8 @@
             otherdir="right"
             nxtscr=fid(ws:screen_of():id()-1) or fid(-1)
         end
-        nxt=nxtscr:current()
-        if obj_is(nxt, "WIonWS") then
+        nxt=nxtscr:current():current()
+        if obj_is(nxt, "WTiling") then
             nxt=nxt:farthest(otherdir)
         end
     end

Reply via email to