naughty: Add a way to revert to the legacy mode.
When `rc.lua` will use the new notification API by default, we need a way to revert back to the lagacy mode to be able to test it.
This commit is contained in:
parent
9ec11bf1b3
commit
21caa19a21
|
@ -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)`.
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue