diff --git a/lib/naughty/core.lua b/lib/naughty/core.lua index 6bdafe16..3520be8d 100644 --- a/lib/naughty/core.lua +++ b/lib/naughty/core.lua @@ -415,6 +415,10 @@ function naughty.get__has_preset_handler() return conns["request::preset"] and #conns["request::preset"] > 0 or false end +function naughty._reset_display_handlers() + conns["request::display"] = nil +end + --- Set new notification timeout. -- -- This function is deprecated, use `notification:reset_timeout(new_timeout)`. diff --git a/tests/test-naughty-legacy.lua b/tests/test-naughty-legacy.lua index 36d585e8..6ef6542d 100644 --- a/tests/test-naughty-legacy.lua +++ b/tests/test-naughty-legacy.lua @@ -11,6 +11,9 @@ local GLib = require("lgi" ).GLib local gpcall = require("gears.protected_call") local dwidget = require("naughty.widget._default") +-- Bypass the new rc.lua and force the legacy mode again. +naughty._reset_display_handlers() + -- This module test deprecated APIs require("gears.debug").deprecate = function() end