Hi,

I've upgraded to the latest ion3, and the latest detach.lua. Great, I
hadn't checked for updates, but many thing had been done to detach.lua
since last time I touched it ;-) (including porting to Lua 5.1).

Now, I have a problem with some windows supposed to be docked, but not
docked automatically. For example, the KDE tray icons of kmix or
akregator, or gkrellm. "real" dockapps like wmbattery still dock
correctly.

Indeed, the problem comes from this piece of code which replaces detach.manager:

function detach.clientwin_manager(cwin, table)
   if detach.manager(cwin, table) then
      return true
   elseif not table.dockapp then
      local sp = nil
      local screen = (ioncore.current() and ioncore.current():screen_of()) or
                     (ioncore.find_screen_id(0))
      for _,r in pairs(screen:llist(2)) do
 if (r:name() == "*scratchpad*") then
    sp = r
 end
      end
      if sp and sp:is_active() then
 sp:attach(cwin)
 cwin:goto()
 return true
      end
      if screen:lcurrent(1):current():manager() and 
obj_is(screen:lcurrent(1):current():manager(), "WFloatWS") then
 screen:lcurrent(1):current():manager():attach(cwin)
      else
 screen:lcurrent(1):current():attach(cwin)
      end
      ioncore.defer(function () cwin:goto() end)
      return true
   end
   return false

end


I have two problems there:

1) I don't really understand what this piece of code is supposed to
   do.

2) The test "if not table.dockapp then" succeeds for KDE tray icons
   and gkrellm.  I don't know what to replace the test by. Either this
   can be considered as a bug in ion (which should set table.dockapp
   whenever the application is to be docked), or a more accurate test
   should be used, but I don't know which one.

Thanks for any hint,

-- 
Matthieu

Reply via email to