Tuomo Valkonen <[EMAIL PROTECTED]> writes:
> On Wed, Feb 16, 2005 at 10:21:21AM +0100, Matthieu Moy wrote:
>> (It seems it's possible to send the window to a WFloatWS inside the
>> layer 2, but I still didn't understand how ...)
>
> First you must create a floatws on layer2:
[...]
:-) :-) :-)
!!!!
Here's what I get:
-- send either the topmost transcient or the window itself if it has
-- no transcient to the scratchpad
function detach_topmost_transient_to_float(cwin)
local to_detach = cwin
local l=cwin:managed_list()
local trs=l[table.getn(l)]
if trs then
to_detach = trs
end
local fws = nil
for _,r in cwin:screen_of():llist(2) do
if obj_is(r, "WFloatWS") then
fws = r
end
end
if fws == nil then
fws = cwin:screen_of():attach_new{
type = "WFloatWS",
layer = 2,
passive = true,
}
end
fws:attach(to_detach)
to_detach:goto()
end
That's simply great. Feel free to make any remark to improve the code,
I'll submit a patch for the scrips repository tonight.
--
Matthieu