From 846119914e9fc7ee26b04a2ce60c242684172178 Mon Sep 17 00:00:00 2001 From: Wenxuan Date: Thu, 12 Nov 2020 15:09:22 +0800 Subject: [PATCH] Fix bug when primary screen is not the 1st screen app_drawer was always created at the first screen. But the primary screen may be not the first screen. --- config/awesome/elemental/app_drawer.lua | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/config/awesome/elemental/app_drawer.lua b/config/awesome/elemental/app_drawer.lua index 6be3c80..da42892 100644 --- a/config/awesome/elemental/app_drawer.lua +++ b/config/awesome/elemental/app_drawer.lua @@ -88,18 +88,19 @@ restart_awesome:buttons(gears.table.join( awful.button({ }, 1, awesome.restart) )) --- Create the widget -app_drawer = wibox({visible = false, ontop = true, type = "dock"}) -awful.placement.maximize(app_drawer) - -app_drawer.bg = "#00000000" --- app_drawer.bg = beautiful.app_drawer_bg or x.background or "#111111" -app_drawer.fg = beautiful.app_drawer_fg or x.foreground or "#FEFEFE" +function app_drawer_create(s) + app_drawer = wibox({visible = false, ontop = true, type = "dock", screen = s}) + awful.placement.maximize(app_drawer) + app_drawer.bg = "#00000000" + -- app_drawer.bg = beautiful.app_drawer_bg or x.background or "#111111" + app_drawer.fg = beautiful.app_drawer_fg or x.foreground or "#FEFEFE" + return app_drawer +end -- Add app drawer or mask to each screen for s in screen do if s == screen.primary then - s.app_drawer = app_drawer + s.app_drawer = app_drawer_create(s) else s.app_drawer = helpers.screen_mask(s, beautiful.lock_screen_bg or beautiful.exit_screen_bg or x.background) end