awesome

Welcome to awesome bug tracking system.
Tasklist

FS#884 - "property::selected"-signal broken?

Attached to Project: awesome
Opened by awesome fan (awesomefan) - Saturday, 09 April 2011, 07:27 GMT
Last edited by Uli Schlachter (psychon) - Saturday, 09 April 2011, 08:08 GMT
Task Type Bug Report
Category Core
Status Closed
Assigned To No-one
Operating System All
Severity Medium
Priority Normal
Reported Version 3.4.9
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

I am using awesome 3.4.9, built from source, on Debian 6.

I would like to auto-select the client under point when changing the selection of tabs.
Doing it like this

tag.add_signal(
"property::selected",
function(t)
local c = mouse.object_under_pointer()
if c then
client.focus = c
end
end
)

does not work. In fact, the function does not get called at all when I change tag selections.
This task depends upon

Closed by  Uli Schlachter (psychon)
Saturday, 09 April 2011, 08:08 GMT
Reason for closing:  Not a bug
Additional comments about closing:  "property::signal" isn't emitted on the tag class, but on the individual tags. Try this (nil means "all screens"):

awful.tag.attached_add_signal(nil, "property::selected", function () print("I know how to use signals") end)

(In the git/master branch this is changed so that instance signals are also emitted on the class, so your code would work there)
Comment by awesome fan (awesomefan) - Saturday, 09 April 2011, 08:29 GMT
Oh, ok. Thank you.

Unfortunately "property::selected" does not work for my use-case. It is called before the actual layout algorithm is run, that is mouse.object_under_pointer() returns the client under point in the old tag selection.
I think awesome need a new signal - something like layout_run ?!
Comment by awesome fan (awesomefan) - Saturday, 09 April 2011, 08:41 GMT
ok, the arrange signal of screen is what I am looking for :D

Loading...