1 -- Flash player opens full-screen windows from Firefox. It closes
2 -- them if they lose focus, but also if they get focus too quickly.
3 -- Therefore set focus 200 ms after such a window is mapped (this may
4 -- need to be adjusted on slower computers).
6 _NET_WM_STATE = ioncore.x_intern_atom('_NET_WM_STATE', false)
7 _NET_WM_STATE_FULLSCREEN = ioncore.x_intern_atom('_NET_WM_STATE_FULLSCREEN',
10 function is_fullscreen(cwin)
11 local state = ioncore.x_get_window_property(cwin:xid(), _NET_WM_STATE, 4,
14 for k, v in pairs(state) do
15 if v == _NET_WM_STATE_FULLSCREEN then
24 class = 'Firefox-bin',
25 match = function(prop, cwin, id) return is_fullscreen(cwin); end,
27 flash_fullscreen = true,
30 ioncore.get_hook('clientwin_do_manage_alt'):add(
32 local winprop = ioncore.getwinprop(cwin)
33 if winprop and winprop.flash_fullscreen then
34 local timer = ioncore.create_timer()
35 timer:set(200, function() cwin:goto() end)