diff options
author | Adrian C. (anrxc) <anrxc@sysphere.org> | 2010-12-14 07:41:13 +0100 |
---|---|---|
committer | Adrian C. (anrxc) <anrxc@sysphere.org> | 2010-12-14 07:41:13 +0100 |
commit | cb11fee2fa0f4cf8b272f46559f8c05e916ba1ca (patch) | |
tree | 4191685880c356532f6acb6dbaa99f24bd96cc5a /scratch | |
parent | 0a3b51a48d5a233b12aea85d9d155834ba1f0043 (diff) | |
download | awesome-configs-cb11fee2fa0f4cf8b272f46559f8c05e916ba1ca.tar.xz |
scratch: fixed pad multiple screen support
Unmanage handler was deleting the wrong client for the scratch
table. Causing lua tracebacks and breaking awesome on next scratch.pad
call. Now proper scratched clients are zeroed in multi display setups.
Diffstat (limited to 'scratch')
-rw-r--r-- | scratch/pad.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scratch/pad.lua b/scratch/pad.lua index cdf87e0..920d1d6 100644 --- a/scratch/pad.lua +++ b/scratch/pad.lua @@ -24,6 +24,7 @@ --------------------------------------------------------------- -- Grab environment +local pairs = pairs local awful = require("awful") local capi = { mouse = mouse, @@ -79,8 +80,8 @@ function set(c, width, height, sticky, screen) if not scratchpad.pad then scratchpad.pad = {} -- add unmanage signal for scratchpad clients capi.client.add_signal("unmanage", function (c) - if scratchpad.pad[screen] == c then - scratchpad.pad[screen] = nil + for scr, cl in pairs(scratchpad.pad) do + if cl == c then scratchpad.pad[scr] = nil end end end) end |