workspace: Don't delete tags with pending clients

This commit is contained in:
James Reed 2021-11-07 15:52:39 -07:00
parent 9101330789
commit b1d40ac030
No known key found for this signature in database
GPG Key ID: 0BE2BD33C5E8125E
1 changed files with 8 additions and 1 deletions

View File

@ -11,11 +11,13 @@ local naughty = require("naughty")
local gtable = require("gears.table")
local gtimer = require("gears.timer")
local protected_call = require("gears.protected_call")
local launch = require("awesome-launch")
local lgi = require("lgi")
local Gio, GLib, GObject = lgi.Gio, lgi.GLib, lgi.GObject
local launch = require("awesome-launch")
local shared = require("awesome-launch.shared")
local ws = {}
ws.client = {}
@ -113,6 +115,11 @@ function ws.new(name, args)
local function delete()
gtimer.delayed_call(function ()
for _, data in pairs(shared.pending) do
if data.props.tag and data.props.tag == tag then
return
end
end
if not tag.selected and #tag:clients() == 0 then
tag:delete()
end