shims: Add support the new .data property
Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
9566defa93
commit
f9775b91de
|
@ -5,6 +5,7 @@ local gears_obj = require("gears.object")
|
|||
-- handlers.
|
||||
local function _shim_fake_class()
|
||||
local obj = gears_obj()
|
||||
obj.data = {}
|
||||
|
||||
local meta = {
|
||||
__index = function()end,
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
return function() return {
|
||||
data = {},
|
||||
connect_signal = function() end
|
||||
} end
|
||||
|
|
|
@ -17,6 +17,7 @@ end
|
|||
-- Create fake clients to move around
|
||||
function client.gen_fake(args)
|
||||
local ret = gears_obj()
|
||||
ret.data = {}
|
||||
ret.type = "normal"
|
||||
ret.valid = true
|
||||
ret.size_hints = {}
|
||||
|
|
|
@ -4,6 +4,7 @@ local drawin, meta = awesome._shim_fake_class()
|
|||
|
||||
local function new_drawin(_, args)
|
||||
local ret = gears_obj()
|
||||
ret.data = {}
|
||||
|
||||
for k, v in pairs(args) do
|
||||
rawset(ret, k, v)
|
||||
|
|
|
@ -6,6 +6,7 @@ screen.count = 1
|
|||
|
||||
local function create_screen(args)
|
||||
local s = gears_obj()
|
||||
s.data = {}
|
||||
|
||||
-- Copy the geo in case the args are mutated
|
||||
local geo = {
|
||||
|
|
|
@ -5,6 +5,7 @@ local tag, meta = awesome._shim_fake_class()
|
|||
local function new_tag(_, args)
|
||||
local ret = gears_obj()
|
||||
|
||||
ret.data = {}
|
||||
ret.name = args.name or "test"
|
||||
ret.activated = true
|
||||
ret.selected = true
|
||||
|
|
Loading…
Reference in New Issue