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.
|
-- handlers.
|
||||||
local function _shim_fake_class()
|
local function _shim_fake_class()
|
||||||
local obj = gears_obj()
|
local obj = gears_obj()
|
||||||
|
obj.data = {}
|
||||||
|
|
||||||
local meta = {
|
local meta = {
|
||||||
__index = function()end,
|
__index = function()end,
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
return function() return {
|
return function() return {
|
||||||
|
data = {},
|
||||||
connect_signal = function() end
|
connect_signal = function() end
|
||||||
} end
|
} end
|
||||||
|
|
|
@ -17,6 +17,7 @@ end
|
||||||
-- Create fake clients to move around
|
-- Create fake clients to move around
|
||||||
function client.gen_fake(args)
|
function client.gen_fake(args)
|
||||||
local ret = gears_obj()
|
local ret = gears_obj()
|
||||||
|
ret.data = {}
|
||||||
ret.type = "normal"
|
ret.type = "normal"
|
||||||
ret.valid = true
|
ret.valid = true
|
||||||
ret.size_hints = {}
|
ret.size_hints = {}
|
||||||
|
|
|
@ -4,6 +4,7 @@ local drawin, meta = awesome._shim_fake_class()
|
||||||
|
|
||||||
local function new_drawin(_, args)
|
local function new_drawin(_, args)
|
||||||
local ret = gears_obj()
|
local ret = gears_obj()
|
||||||
|
ret.data = {}
|
||||||
|
|
||||||
for k, v in pairs(args) do
|
for k, v in pairs(args) do
|
||||||
rawset(ret, k, v)
|
rawset(ret, k, v)
|
||||||
|
|
|
@ -6,6 +6,7 @@ screen.count = 1
|
||||||
|
|
||||||
local function create_screen(args)
|
local function create_screen(args)
|
||||||
local s = gears_obj()
|
local s = gears_obj()
|
||||||
|
s.data = {}
|
||||||
|
|
||||||
-- Copy the geo in case the args are mutated
|
-- Copy the geo in case the args are mutated
|
||||||
local geo = {
|
local geo = {
|
||||||
|
|
|
@ -5,6 +5,7 @@ local tag, meta = awesome._shim_fake_class()
|
||||||
local function new_tag(_, args)
|
local function new_tag(_, args)
|
||||||
local ret = gears_obj()
|
local ret = gears_obj()
|
||||||
|
|
||||||
|
ret.data = {}
|
||||||
ret.name = args.name or "test"
|
ret.name = args.name or "test"
|
||||||
ret.activated = true
|
ret.activated = true
|
||||||
ret.selected = true
|
ret.selected = true
|
||||||
|
|
Loading…
Reference in New Issue