Tuomo Valkonen <[EMAIL PROTECTED]> writes:
> On 2007-05-28, Matthieu Moy <[EMAIL PROTECTED]> wrote:
>> It should be unnecessary, but there's a bug. The name remains
>> WGroupCW<something> until the first redraw (resize the frame or so).
>
> Hmm. Maybe I'd call it a feature :). The name of the group does not
> change, and displayname changes are not signalled at all.
>
> However, if you do as I explained in the follow-up posting, the name
> should be initially correct.
OK, I didn't understand the explanations at first (btw, {bottom = ...}
and {reg = ...} are not documented on
http://modeemi.cs.tut.fi/~tuomov/ion-doc-3/ionconf/node7.html ).
I think I've got it now:
detach = {
}
function detach.topmost_transient(cwin, float)
local reg = cwin
while obj_typename(reg) ~= "WGroupCW" do
reg = reg:manager()
end
ioncore.defer(function ()
local cwing = {}
if float then
cwing = cwin:geom()
end
local managed_list = {{ reg = cwin, bottom = true}}
local newparam = {type = 'WGroupCW', sizepolicy = 'free',
switchto = true, managed = managed_list, geom = cwing}
local g = reg:manager():attach_new(newparam)
if float then
ioncore.detach(g, 'set')
g:goto()
end
end)
return false
end
--
Matthieu