In the tiny teeny Awesome GNOME applet I'm developing, I'm using the
following LUA snippets for communication from Awesome to the applet:
function awesome_dbus_notify (signal)
dbus_iface = "cc.upsilon.awesomeapplet.NotifyInterface"
dbus_signal = string.format("%s.%s", dbus_iface, signal)
dbus_send_cmd = string.format("dbus-send --type=signal / %s", dbus_signal)
awful.util.spawn(dbus_send_cmd)
end
for i = 1, screen.count() do
s = screen[i]
s:add_signal("tag::history::update",
function (t)
awesome_dbus_notify("LayoutUpdate")
end)
end
awful.tag.attached_add_signal(nil, "property::layout",
function ()
awesome_dbus_notify("LayoutUpdate")
end)
That gives me an unpleasant side-effect: every time awesome_dbus_notify
is invoked, an "awesome spawn" (hidden?) window is created. It is not
visible, but I can see it in the GNOME window list as if it were a
minimized window. I get one at each awesome_dbus_notify invocation, so I
can end up easily having several of them. While the windows are a bit
annoying, what is even more annoying is that Awesome turns the mouse
pointer into a clock, as if some operation was going on. After a while,
some timeout occurs, the windows disappear and the mouse pointer gets
back to normal.
It looks like awful.util.spawn() doesn't realize when dbus-send is over
(i.e. immediately after its invocation) and timeouts at some point.
Is there a way to tell Awesome not to wait for dbus-send?
Alternatively, I can add --print-reply to dbus-send invocation, but it
doesn't seem to be a clean way to handle this ...
Many thanks in advance,
Cheers.
--
Stefano Zacchiroli -o- PhD in Computer Science \ PostDoc @ Univ. Paris 7
z...@{upsilon.cc,pps.jussieu.fr,debian.org} -<>- http://upsilon.cc/zack/
Quando anche i santi ti voltano le spalle, | . |. I've fans everywhere
ti resta John Fante -- V. Capossela .......| ..: |.......... -- C. Adams
--
To unsubscribe, send mail to [email protected].