client: Extend request::tag instead of awful.tag.withcurrent
There was a regression when refactoring the API. It was no longer possible to disable the automatic tag selection. Due to recent changes, it was no longer possible to disable the default tag selection handler. This commit extend the already existing request::tag mechanism to let handlers select the tags.
This commit is contained in:
parent
7cd76e0529
commit
299e155acc
2
ewmh.c
2
ewmh.c
|
@ -399,7 +399,7 @@ ewmh_process_desktop(client_t *c, uint32_t desktop)
|
|||
if(desktop == 0xffffffff)
|
||||
{
|
||||
luaA_object_push(L, c);
|
||||
lua_pushnil(L);
|
||||
lua_pushboolean(L, true);
|
||||
luaA_object_emit_signal(L, -2, "request::tag", 1);
|
||||
/* Pop the client, arguments are already popped */
|
||||
lua_pop(L, 1);
|
||||
|
|
|
@ -177,8 +177,14 @@ end
|
|||
--
|
||||
-- @client c A client to tag
|
||||
-- @tag[opt] t A tag to use. If omitted, then the client is made sticky.
|
||||
function ewmh.tag(c, t)
|
||||
-- @tparam[opt={}] table hints Extra information
|
||||
function ewmh.tag(c, t, hints) --luacheck: no unused
|
||||
-- There is nothing to do
|
||||
if not t and #c:tags() > 0 then return end
|
||||
|
||||
if not t then
|
||||
c:to_selected_tags()
|
||||
elseif type(t) == "boolean" and t then
|
||||
c.sticky = true
|
||||
else
|
||||
c.screen = t.screen
|
||||
|
|
|
@ -29,10 +29,6 @@ local function get_screen(s)
|
|||
return s and capi.screen[s]
|
||||
end
|
||||
|
||||
-- awful.client is required() at the end of this file so the miss_handler is set
|
||||
-- before it is being required.
|
||||
local client
|
||||
|
||||
local tag = {object = {}, mt = {} }
|
||||
|
||||
-- Private data
|
||||
|
@ -1370,11 +1366,6 @@ object.properties(capi.tag, {
|
|||
setter_fallback = tag.setproperty,
|
||||
})
|
||||
|
||||
-- fix a load loop
|
||||
client = require("awful.client")
|
||||
capi.client.connect_signal("manage", function(c) client.object.to_selected_tags(c) end)
|
||||
|
||||
|
||||
return setmetatable(tag, tag.mt)
|
||||
|
||||
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80
|
||||
|
|
|
@ -12,6 +12,7 @@ local function add_signals(c)
|
|||
c:add_signal("property::screen")
|
||||
c:add_signal("property::geometry")
|
||||
c:add_signal("request::geometry")
|
||||
c:add_signal("request::tag")
|
||||
c:add_signal("swapped")
|
||||
c:add_signal("raised")
|
||||
c:add_signal("property::_label") --Used internally
|
||||
|
|
Loading…
Reference in New Issue