From 2a65d8ade12affb058bb90941e3f4829cce8ecc3 Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Wed, 13 Oct 2021 21:18:22 -0700 Subject: [PATCH] tests: Fix the layoutlist popup example. `gears.table.cycle_value` returns 2 values. That accidentally passed the second one to `awful.layout.set`, which didn't like it at all. --- tests/examples/awful/widget/layoutlist/popup.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/examples/awful/widget/layoutlist/popup.lua b/tests/examples/awful/widget/layoutlist/popup.lua index 3aab7290..8eddca02 100644 --- a/tests/examples/awful/widget/layoutlist/popup.lua +++ b/tests/examples/awful/widget/layoutlist/popup.lua @@ -59,16 +59,18 @@ local modkey = "mod4" --DOC_HIDE start_callback = function() layout_popup.visible = true end, stop_callback = function() layout_popup.visible = false end, export_keybindings = true, - release_event = "release", + stop_event = "release", stop_key = {"Escape", "Super_L", "Super_R"}, keybindings = { {{ modkey } , " " , function() - awful.layout.set(gears.table.cycle_value(ll.layouts, ll.current_layout, 1)) + awful.layout.set((gears.table.cycle_value(ll.layouts, ll.current_layout, 1))) end}, {{ modkey, "Shift" } , " " , function() - awful.layout.set(gears.table.cycle_value(ll.layouts, ll.current_layout, -1), nil) + awful.layout.set((gears.table.cycle_value(ll.layouts, ll.current_layout, -1)), nil) end}, } } + layout_popup.visible = true --DOC_HIDE + --DOC_HIDE vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80