Setting a client's gravity in a tag's @on_match@ is broken
Basically, if you try to set a client's gravity in the
on_match of a tag, it will work if the tag is in the first view, but doesn't work in the other views. To see what I mean... try this config:
Now, what this does is, puts all the terminals on the
foo tag and Firefox on the
bar tag (adjust it as needed). And then, when the clients match, it will manually assign them gravities by using
This works correctly on the
foo view (all the terminals are on the left side), but does not work for the
bar view (Firefox is not on the right side as expected).
In addition, it spews out these error messages on the console:
<WARNING> StandardError: No geometry given from /mnt/pauan/.config/subtle/subtle.rb:49:in `gravity' from /mnt/pauan/.config/subtle/subtle.rb:49:in `block (2 levels) in <main>' from -e:in `call' <WARNING> StandardError: No geometry given from /mnt/pauan/.config/subtle/subtle.rb:40:in `gravity' from /mnt/pauan/.config/subtle/subtle.rb:40:in `block (2 levels) in <main>'
So, the two bugs are:
- Complaining about a lack of geometry when setting the gravity of the client
- Setting the gravity of a client only works on the first view (possibly related to the above bug?)
#5 Updated by Sae Hirak over 7 years ago
Okay... so it seems that when a tag's
on_match is called when a client is created, the client has not yet been assigned to a view yet. Is there a reason for this?
It seems to me it would be much preferable to run the tag's
on_match at about the same time as the
:client_create event. That is, after everything (gravities, view, etc.) has been set up.
#6 Updated by Christoph Kappel over 7 years ago
- Category set to Bugfix
- Status changed from Unconfirmed to Confirmed
- Assignee set to Non member users
- Target version set to Xi
I see the problem now, subtle cannot use the means of subtlext to create e.g. the client object, because it cannot be accurate at that point. Therefore subtle manually creates the objects. r3210 includes proper tagging information now, geometry and gravity are still missing, because I cannot add it that easily.
The reason for that is the roundtrip that is required to pass information to the X-server and to fetch the information in a single-thread process. I use some tricks to make it still possible, but it isn't perfect as you can see.