i3: Window title changes should trigger window swallowing (layout saving)
@teto reports that i3 doesn’t swallow urxvt with the following layout JSON file:
// vim:ts=4:sw=4:et
{
"border": "pixel",
"current_border_width": 1,
"floating": "auto_off",
"geometry": {
"height": 388,
"width": 734,
"x": 0,
"y": 0
},
"name": "/home/teto",
"percent": 1,
"swallows": [
{
"class": "^URxvt$",
// "instance": "^rxvt\\-unicode$",
"title": "^/home/teto/dce$"
// "transient_for": "^$"
}
],
"type": "con"
}
@teto starts urxvt like this:
#!/bin/sh
i3-msg "workspace 9; append_layout $HOME/.i3/test.json"
urxvt -cd $HOME/dce
Having a look at the logfile reveals that urxvt first starts up with a different title and later changes its _NET_WM_NAME
property to set the correct title.
i3 should, once it got the new title, check whether the window can be matched by any of the placeholders and swallow it if so.
This affects not only window titles, but all properties that can be used to swallow a window.
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Reactions: 4
- Comments: 21 (12 by maintainers)
I can work on this. I do have one question though. I see two ways of implementing this: Destroying the original window’s container and reparenting it to the swallow one or destroying the swallow window container and moving the original container. Is either method preferable?
thanks !
If I launch a Firefox window with a specific url, the title doesn’t get set until the page loads. As a result, my layout restore always puts the Firefox Windows in the wrong spot. On Apr 4, 2016 07:22, “Ingo Bürk” notifications@github.com wrote:
I went ahead and moved this into a new issue @JonnyHaystack.
I get some very strange bugs when restoring multiple windows in a 4x4 grid by appending a layout and then opening terminal windows whose titles adjust are changed after initial window creation. When I use the old workaround of unmapping all the windows in the workspace, appending the layout, then remapping the windows, it works fine as it always has.
How it should look (and how it does look when I restore it in the old way):
How it looks when the windows are swallowed after a title change:
These are not mere graphical artifiacts, because if I keep pressing enter you can see that the prompt never goes below the top of the “artifact”, so the window must actually be ending there, and the tiling has completely broken.
Also thanks @izzel for your work on this, it’s a great improvement to have. In most situations it has worked perfectly for me, and I’m not sure if this weird bug is directly related to this change or if this change is bringing to light a bug somewhere else in the codebase.