]> git.decadent.org.uk Git - ion3.git/blobdiff - ioncore/ioncore_winprops.lua
[svn-upgrade] Integrating new upstream version, ion3 (20070203)
[ion3.git] / ioncore / ioncore_winprops.lua
index 333ff69a3667fd8073f6222dc9ee23f939d4e5c6..c241d63b378a6247c7edec07ff5b9cdf78b80e67 100644 (file)
@@ -1,7 +1,7 @@
 --
 -- ion/share/ioncore_winprops.lua
 -- 
--- Copyright (c) Tuomo Valkonen 2004-2006.
+-- Copyright (c) Tuomo Valkonen 2004-2007.
 --
 -- Ion is free software; you can redistribute it and/or modify it under
 -- the terms of the GNU Lesser General Public License as published by
@@ -68,7 +68,7 @@ function ioncore.getwinprop(cwin)
     end
 end
 
-ioncore.set_get_winprop_fn(ioncore.getwinprop)
+ioncore.set{_get_winprop=ioncore.getwinprop}
 
 local function ensure_winproptab(class, role, instance)
     if not winprops[class] then
@@ -91,14 +91,16 @@ end
 --DOC
 -- The basic name-based winprop matching criteria.
 function ioncore.match_winprop_name(prop, cwin)
-    local nm=cwin:name()
     if not prop.name then
         return true
-    elseif nm then
-        local st, en=string.find(nm, prop.name)
-        return (st and en)
     else
-        return false
+        local nm=cwin:name()
+        if nm then
+            local st, en=string.find(nm, prop.name)
+            return (st and en)
+        else
+            return false
+        end
     end
 end