flash: correct how fullscreen PPAPI Flash is detected by shifty

`config.apps` can now use a function to do detection.
This commit is contained in:
Vincent Bernat 2013-07-05 10:33:05 +02:00
parent 60908e329d
commit 9adf371e95
3 changed files with 14 additions and 1 deletions

View file

@ -497,6 +497,11 @@ function match(c, startup)
for i, a in ipairs(config.apps) do
if a.match then
local matched = false
-- match function
if not matched and a.match.check then
matched = a.match.check(c)
end
-- match only class
if not matched and cls and a.match.class then
for k, w in ipairs(a.match.class) do

View file

@ -30,6 +30,7 @@ awful.rules.rules = {
properties = { floating = true }}, -- Flash with Firefox
{ rule = { instance = "exe", class = "Exe" },
properties = { floating = true }}, -- Flash with Chromium
-- See also tags.lua
-- Pidgin
{ rule = { class = "Pidgin" },
except = { role = "buddy_list" }, -- buddy_list is the master

View file

@ -70,7 +70,14 @@ shifty.config.apps = {
{
match = { class = { "Keepassx", "Key[-]mon" },
role = { "pop[-]up" },
name = { "Firebug", "Chromium" },
name = { "Firebug" },
check = function (c)
return awful.rules.match(c,
{ instance = "chromium",
class = "Chromium",
name = "Chromium",
fullscreen = true })
end,
instance = { "plugin[-]container", "exe" } },
intrusive = true,
},