From 3e19251d144eb59aa7eb995843165765bd54589b Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Wed, 10 Jul 2019 21:03:05 -0400 Subject: [PATCH] screen: Set the managed flag when creating screens in awful.screen. --- lib/awful/screen.lua | 8 ++++---- lib/awful/screen/dpi.lua | 7 ++++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/lib/awful/screen.lua b/lib/awful/screen.lua index 1f8a44cfa..4d8f9918b 100644 --- a/lib/awful/screen.lua +++ b/lib/awful/screen.lua @@ -941,10 +941,10 @@ capi.screen.connect_signal("added", function(s) -- If it was emited from here when screens are created with fake_add, -- the Lua code would not have an opportunity to polutate the screen -- metadata. Thus, the DPI may be wrong when setting the wallpaper. - --if capi.screen.automatic_factory then - s:emit_signal("request::desktop_decoration") - s:emit_signal("request::wallpaper") - --end + if s._managed ~= "Lua" then + s:emit_signal("request::desktop_decoration") + s:emit_signal("request::wallpaper") + end end) -- Resize the wallpaper(s) diff --git a/lib/awful/screen/dpi.lua b/lib/awful/screen/dpi.lua index feaec4704..72a2687f2 100644 --- a/lib/awful/screen/dpi.lua +++ b/lib/awful/screen/dpi.lua @@ -152,13 +152,14 @@ function module.create_screen_handler(viewport) geo.x, geo.y, geo.width, - geo.height + geo.height, + {_managed = true} ) update_screen_viewport(s) - --s:emit_signal("request::desktop_decoration") - --s:emit_signal("request::wallpaper") + s:emit_signal("request::desktop_decoration") + s:emit_signal("request::wallpaper") end function module.remove_screen_handler(viewport)