From f9775b91dee9cbc701021f0e66c7e4fd7cd4bcfc Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Fri, 30 Sep 2016 11:03:56 +0200 Subject: [PATCH] shims: Add support the new .data property Signed-off-by: Uli Schlachter --- tests/examples/shims/awesome.lua | 1 + tests/examples/shims/button.lua | 1 + tests/examples/shims/client.lua | 1 + tests/examples/shims/drawin.lua | 1 + tests/examples/shims/screen.lua | 1 + tests/examples/shims/tag.lua | 1 + 6 files changed, 6 insertions(+) diff --git a/tests/examples/shims/awesome.lua b/tests/examples/shims/awesome.lua index 7dd586c5b..4e53c7639 100644 --- a/tests/examples/shims/awesome.lua +++ b/tests/examples/shims/awesome.lua @@ -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, diff --git a/tests/examples/shims/button.lua b/tests/examples/shims/button.lua index f3170d89e..be0e3ecdd 100644 --- a/tests/examples/shims/button.lua +++ b/tests/examples/shims/button.lua @@ -1,3 +1,4 @@ return function() return { + data = {}, connect_signal = function() end } end diff --git a/tests/examples/shims/client.lua b/tests/examples/shims/client.lua index 9b735e3d6..d99411660 100644 --- a/tests/examples/shims/client.lua +++ b/tests/examples/shims/client.lua @@ -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 = {} diff --git a/tests/examples/shims/drawin.lua b/tests/examples/shims/drawin.lua index d8c289129..6003f975e 100644 --- a/tests/examples/shims/drawin.lua +++ b/tests/examples/shims/drawin.lua @@ -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) diff --git a/tests/examples/shims/screen.lua b/tests/examples/shims/screen.lua index 98de3e7ae..09dc622c1 100644 --- a/tests/examples/shims/screen.lua +++ b/tests/examples/shims/screen.lua @@ -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 = { diff --git a/tests/examples/shims/tag.lua b/tests/examples/shims/tag.lua index ff2ab4a7f..aaac467ec 100644 --- a/tests/examples/shims/tag.lua +++ b/tests/examples/shims/tag.lua @@ -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