Detach a transient from a frame

Matthieu Moy <Matthieu.Moy-wMUr/[email protected]>
Newsgroups gmane.comp.window-managers.ion.general
Message-ID <[email protected]>
Hi,

I'm trying to detach a transient window from its parent in ion, using
WTiling. Some applications require interaction between the application
window and a transient, and in this case, having two real frames for
the two clientwin is handy.

Here's the current state of my work :


detach = {
   
}

function detach.topmost_transient(group)
   group:managed_i(function(cwin) 
                      if cwin==group:current() then
                         io.stderr:write("attach " .. cwin:name() .. " to " .. group:manager():name() .. "\n")
                         detach.cwin = cwin
                         ioncore.defer(function ()
                                          --ioncore.detach(cwin, 'toggle')
                                          group:manager():attach(cwin)
                                          detach.put_in_group(cwin)
                                       end)
                      end
                      return true
                   end)
   return true
end

function detach.put_in_group(cwin)
   local m = cwin:manager()
   ioncore.defer(function()
                    local g = m:attach_new({type = 'WGroupCW', name = cwin:name()})
                    g:attach(cwin)
                 end)
end


The first problem I have is that it seems the clientwin are usually
not attached to a frame, they're instead managed by a WGroupCW, whose
manager is a WFrame. If I attach a WClientWin directly to a WFrame,
then ioncore.detach(_, 'toggle') doesn't work anymore for it. So I
tried to reproduce the usual behavior with detach.put_in_group(), but
then, I get some strange behavior. For example, if I detach this
WGroupCW, and then resize it, the WClientWin doesn't resize. And if I
do MOD-c on the WGroupCW, then the WClientWin is closed, leaving an
empty WGroupCW.

What am I missing?

Thanks,

-- 
Matthieu
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.