Discussion:
Youtube fullscreen not working
Tony Emma
2009-12-13 22:38:34 UTC
Permalink
Hello

thank you for ION.

I have the same problem i can't use fullscreen mode. I try your solution but
it's don't work.

I had ioncore.write_savefile("windowinfos", cwin:get_ident()) but there is
not file "windowinfos.lua"

I'm on Debian and i use iceweasel.

uname -a
Linux LMG 2.6.31-1-amd64 #1 SMP Mon Nov 16 04:44:38 UTC 2009 x86_64
GNU/Linux

and i use iceweasel. I had the block

defwinprop {
class = 'Iceweasel',
instance = 'Navigator',
match = function(prop, cwin, id) return is_fullscreen(cwin); end,
switchto = false,
flash_fullscreen = true,
}

but nothing.



See my cfg_kludge_flash.lua:

_NET_WM_STATE = ioncore.x_intern_atom('_NET_WM_STATE', false)
_NET_WM_STATE_FULLSCREEN = ioncore.x_intern_atom('_NET_WM_STATE_FULLSCREEN',
false)

function is_fullscreen(cwin)
local state = ioncore.x_get_window_property(cwin:xid(), _NET_WM_STATE,
4,
1, true)
if state then
for k, v in pairs(state) do
if v == _NET_WM_STATE_FULLSCREEN then
return true
end
end
end
return false
end

defwinprop {
class = 'Firefox-bin',
instance = 'Firefox-bin',
-- match = function(prop, cwin, id)
-- local geom = cwin:geom()
-- return is_fullscreen(cwin) and geom.w == 200 and geom.h ==
200
-- end,

match = function(prop, cwin, id) return is_fullscreen(cwin); end,
switchto = false,
flash_fullscreen = true,
}

defwinprop {
class = 'Iceweasel',
instance = 'Navigator',
-- match = function(prop, cwin, id)
-- local geom = cwin:geom()
-- return is_fullscreen(cwin) and geom.w == 200 and geom.h ==
200
-- end,

match = function(prop, cwin, id) return is_fullscreen(cwin); end,
switchto = false,
flash_fullscreen = true,
}


ioncore.get_hook('clientwin_do_manage_alt'):add(
function(cwin, table)
--ioncore.write_savefile("windowinfos", cwin:get_ident())
local winprop = ioncore.getwinprop(cwin)
if winprop and winprop.flash_fullscreen then
local timer = ioncore.create_timer()
timer:set(200, function() cwin:goto() end)
return true
else
return false
end
end
)


Please help me
ebik
2009-12-14 06:18:47 UTC
Permalink
I think you were looking for windowinfos.lua in wrong directory.
It is not saved into .ion3/ itself, but in .ion3/default-session-0/
(if you did not changed your ion session directory).
Post by Tony Emma
class = 'Firefox-bin',
instance = 'Firefox-bin',
Here I think that instance should be lowercase, but I'm not sure.
First try to omit instance.

Also the script may not work in specific circumstances. I have two
computers, but only on one is the solution working reliably. (The
other computer is old, some plugins in iceweasel installed etc.)
--
Tomáš 'ebík' Ebenlendr
PF 2009.95150459792
Tony Emma
2009-12-14 20:27:47 UTC
Permalink
Hello ebik.

So the problem with the file windowinfos is due to configuration. I must add
in file cfg_kludges.lua:

dopath("cfg_kludge_flash.lua")

Now i have a file. See the content:
-- Ce fichier a été généré par Ion, Ne pas éditer.
return {
["instance"] = "xterm",
["class"] = "UXTerm",
}

I create a block in my file cfg_kludge_flash.lua

defwinprop {
class = 'UXTerm',
instance = 'xterm',
--match = function(prop, cwin, id)

-- local geom = cwin:geom()
-- return is_fullscreen(cwin) and geom.w == 200 and geom.h ==
200
-- end,

match = function(prop, cwin, id) return is_fullscreen(cwin); end,
switchto = false,
flash_fullscreen = true,
}

The fullscreen mode doesn't work. :(

I try this:
defwinprop {
class = 'UXTerm',
instance = 'xterm',

match = function(prop, cwin, id)
local geom = cwin:geom()
return is_fullscreen(cwin) and geom.w == 200 and geom.h == 200
end,

--match = function(prop, cwin, id) return is_fullscreen(cwin); end,
switchto = false,
flash_fullscreen = true,
}

The fullscreen mode stay few seconds then it disappear

Have you any ideas?

Tony
Post by ebik
I think you were looking for windowinfos.lua in wrong directory.
It is not saved into .ion3/ itself, but in .ion3/default-session-0/
(if you did not changed your ion session directory).
Post by Tony Emma
class = 'Firefox-bin',
instance = 'Firefox-bin',
Here I think that instance should be lowercase, but I'm not sure.
First try to omit instance.
Also the script may not work in specific circumstances. I have two
computers, but only on one is the solution working reliably. (The
other computer is old, some plugins in iceweasel installed etc.)
--
Tomáš 'ebík' Ebenlendr
PF 2009.95150459792
Canaan Hadley-Voth
2009-12-14 21:20:12 UTC
Permalink
    class = 'UXTerm',
    instance = 'xterm',
I see that you're following the instruction "restart ion, fullscreen a flash
video and see what got written to windowinfos.lua" very precisely, but in the
act of "see what got written" you're opening an xterm window, and
windowinfos.lua only shows you the *last* client window opened, in your case
the xterm. So open xterm first, then fullscreen a flash video, then enter the
command in the terminal that would read the file windowinfos.lua.

If it still fails when you get the right class and instance, the author of
script warned that the delay may need to be adjusted on some computers, which
means changing the number in "timer:set(200, function() cwin:goto() end)".
Tony Emma
2009-12-14 22:45:07 UTC
Permalink
Ok Thank You !!!!

It's work now :)

Sorry i'm not an expert but when i see xterm i was surprised.

the content of file windowinfos.lua is
-- Ce fichier a été généré par Ion, Ne pas éditer.
return {
["instance"] = "firefox-bin",
["class"] = "Firefox-bin",
}

FILE cfg_kludge_flash.lua:

-- Flash player opens full-screen windows from Firefox with size
-- request 200x200. It closes them if they lose focus, but also if
-- they get focus too quickly. Therefore set focus 200 ms after
-- such a window is mapped (this may need to be adjusted on slower
-- computers).

_NET_WM_STATE = ioncore.x_intern_atom('_NET_WM_STATE', false)
_NET_WM_STATE_FULLSCREEN = ioncore.x_intern_atom('_NET_WM_STATE_FULLSCREEN',
false)

function is_fullscreen(cwin)
local state = ioncore.x_get_window_property(cwin:xid(), _NET_WM_STATE,
4,
1, true)
if state then
for k, v in pairs(state) do
if v == _NET_WM_STATE_FULLSCREEN then
return true
end
end
end
return false
end

defwinprop {
class = 'Firefox-bin',
instance = 'firefox-bin',
-- match = function(prop, cwin, id)
-- local geom = cwin:geom()
-- return is_fullscreen(cwin) and geom.w == 200 and geom.h ==
200
-- end,
match = function(prop, cwin, id) return is_fullscreen(cwin); end,
switchto = false,
flash_fullscreen = true,
}

ioncore.get_hook('clientwin_do_manage_alt'):add(
function(cwin, table)
--ioncore.write_savefile("windowinfos", cwin:get_ident())
local winprop = ioncore.getwinprop(cwin)
if winprop and winprop.flash_fullscreen then
local timer = ioncore.create_timer()
timer:set(500, function() cwin:goto() end)
return true
else
return false
end
end
)


I have changed also the timer to 500 ms. Now it's work.

PS: I have the same problem with VLC or game the fullscreen mode doesn't
work. It's not a real problem because i can do ALT + ENTER for fullscreen.

Thank very much
Post by Canaan Hadley-Voth
Post by Tony Emma
class = 'UXTerm',
instance = 'xterm',
I see that you're following the instruction "restart ion, fullscreen a flash
video and see what got written to windowinfos.lua" very precisely, but in the
act of "see what got written" you're opening an xterm window, and
windowinfos.lua only shows you the *last* client window opened, in your case
the xterm. So open xterm first, then fullscreen a flash video, then enter the
command in the terminal that would read the file windowinfos.lua.
If it still fails when you get the right class and instance, the author of
script warned that the delay may need to be adjusted on some computers, which
means changing the number in "timer:set(200, function() cwin:goto() end)".
Tony Emma
2009-12-15 20:29:02 UTC
Permalink
Hello,

Sorry, I still have the problem. In fact it's work for Youtube but not for
dalymotion and other Flash applications. Why?

Tony
Post by Tony Emma
Ok Thank You !!!!
It's work now :)
Sorry i'm not an expert but when i see xterm i was surprised.
the content of file windowinfos.lua is
-- Ce fichier a été généré par Ion, Ne pas éditer.
return {
["instance"] = "firefox-bin",
["class"] = "Firefox-bin",
}
-- Flash player opens full-screen windows from Firefox with size
-- request 200x200. It closes them if they lose focus, but also if
-- they get focus too quickly. Therefore set focus 200 ms after
-- such a window is mapped (this may need to be adjusted on slower
-- computers).
_NET_WM_STATE = ioncore.x_intern_atom('_NET_WM_STATE', false)
_NET_WM_STATE_FULLSCREEN =
ioncore.x_intern_atom('_NET_WM_STATE_FULLSCREEN',
false)
function is_fullscreen(cwin)
local state = ioncore.x_get_window_property(cwin:xid(), _NET_WM_STATE,
4,
1, true)
if state then
for k, v in pairs(state) do
if v == _NET_WM_STATE_FULLSCREEN then
return true
end
end
end
return false
end
defwinprop {
class = 'Firefox-bin',
instance = 'firefox-bin',
-- match = function(prop, cwin, id)
-- local geom = cwin:geom()
-- return is_fullscreen(cwin) and geom.w == 200 and geom.h ==
200
-- end,
match = function(prop, cwin, id) return is_fullscreen(cwin); end,
switchto = false,
flash_fullscreen = true,
}
ioncore.get_hook('clientwin_do_manage_alt'):add(
function(cwin, table)
--ioncore.write_savefile("windowinfos", cwin:get_ident())
local winprop = ioncore.getwinprop(cwin)
if winprop and winprop.flash_fullscreen then
local timer = ioncore.create_timer()
timer:set(500, function() cwin:goto() end)
return true
else
return false
end
end
)
I have changed also the timer to 500 ms. Now it's work.
PS: I have the same problem with VLC or game the fullscreen mode doesn't
work. It's not a real problem because i can do ALT + ENTER for fullscreen.
Thank very much
Post by Canaan Hadley-Voth
Post by Tony Emma
class = 'UXTerm',
instance = 'xterm',
I see that you're following the instruction "restart ion, fullscreen a flash
video and see what got written to windowinfos.lua" very precisely, but in the
act of "see what got written" you're opening an xterm window, and
windowinfos.lua only shows you the *last* client window opened, in your case
the xterm. So open xterm first, then fullscreen a flash video, then enter the
command in the terminal that would read the file windowinfos.lua.
If it still fails when you get the right class and instance, the author of
script warned that the delay may need to be adjusted on some computers, which
means changing the number in "timer:set(200, function() cwin:goto() end)".
Canaan Hadley-Voth
2009-12-16 03:12:37 UTC
Permalink
Hello,Sorry, I still have the problem. In fact it's work for Youtube but not
for dalymotion and other Flash applications. Why?Tony
I find it works on most sites. Since you mentioned that, I tried some more, and
failed with Hulu and Dailymotion. Hulu, I got to work by increasing the timer
from 200 all the way to 2000. Dailymotion wasn't working with any sort of time
delay, so then I removed cwin:goto() from the timer function completely, making
it look like this:

timer:set(2000, function() end)

So now it successfully creates the fullscreen window but doesn't switch to it
until I do so manually with Alt-G and tab-completion. And that works. And it
*doesn't* work if I use the "next workspace" bindings. At the moment I don't
really understand why it works.

Loading...