Re: Detach a transient from a frame
Matthieu Moy <Matthieu.Moy-wMUr/[email protected]>
| Newsgroups | gmane.comp.window-managers.ion.general |
|---|---|
| Message-ID | <[email protected]> |
Tuomo Valkonen <[email protected]> writes: > On 2007-05-28, Matthieu Moy <Matthieu.Moy-wMUr/[email protected]> wrote: >> What am I missing? > > You have to make the client window the "bottom" of the group. OK, that's it. Tuomo Valkonen <[email protected]> writes: > On 2007-05-28, Tuomo Valkonen <[email protected]> wrote: >> You have to make the client window the "bottom" of the group. >> (Set bottom=true in the attach parameter table). Also note that > > One more thing: The name=cwin:name() setting is also unnecessary, > because the "displayname" is always the bottom's name, when bottom > is set. It should be unnecessary, but there's a bug. The name remains WGroupCW<something> until the first redraw (resize the frame or so). Here's the result : detach = { } function detach.topmost_transient(cwin) local reg = cwin while obj_typename(reg) ~= "WGroupCW" do reg = reg:manager() end ioncore.defer(function () local g = reg:manager():attach_new({type = 'WGroupCW', switchto = true}) g:attach(cwin, {bottom = true}) end) return false end function detach.topmost_transient_fl(cwin) local reg = cwin while obj_typename(reg) ~= "WGroupCW" do reg = reg:manager() end ioncore.defer(function () local g = reg:manager():attach_new({type = 'WGroupCW', switchto = true}) local cwing = cwin:geom() ioncore.detach(g) -- g is a group of window, we set the size of the containing frame. g:manager():rqgeom(cwing) g:attach(cwin, {bottom = true, switchto = true}) g:goto() end) return false end Thanks a lot, -- Matthieu