[i3-discuss] Re: Windows do not swallow after restoring layout

  • From: Ingo Bürk <admin@xxxxxxxxxxxx>
  • To: i3-discuss@xxxxxxxxxxxxx
  • Date: Fri, 25 Dec 2015 01:27:27 -0500

I think what should work is to unmap and map the window. You can do that with
xdotool. Mapping the window causes i3 to remanage it and then swallow it.

There's an open feature request to trigger swallowing upon changes of window
name etc. Once that is implemented you could also just trigger a property
change. It's not implemented yet, though.

Ingo

Sent from TypeMail



On Dec 24, 2015, 20:44, at 20:44, Kelvin <kelvin9302104@xxxxxxxxx> wrote:

Oh! It works when I open konsole / gvim after I have loaded the layout!

What I did was to *move* konsole / gvim from another workspace to the
workspace with layout loaded and the windows do not swallow. Is there
any way to make this work? Thank you!

(P.S.: I tried to really *open* konsole / gvim after I have loaded the
layout many months ago and it did not work. I guess this bug has been
fixed in the new version so it works now.)

2015-12-25 9:33 GMT+08:00 Ingo Bürk <admin@xxxxxxxxxxxx>:
Just to make sure, you actually *open* konsole / gvim *after* you've
loaded
the layout, right? Because it won't swallow windows that are already
there.

If so, please file a bug on Github and provide a log file (see the
debugging
docs on the website).

Ingo

Sent from TypeMail

On Dec 24, 2015, at 19:41, Kelvin <kelvin9302104@xxxxxxxxx> wrote:

('Windows' is the plural form of 'window', not Mircosoft Windows)

I am trying to save the current layout and restore it. I used the
command `i3-save-tree --workspace 5 > ~/.i3/workspace_5.json` to
save
the layout and edited the layout manually. The current layout file
is:

{
"border": "normal",
"current_border_width": 0,
"floating": "auto_off",
"geometry": {
"height": 1060,
"width": 1920,
"x": 0,
"y": 0
},
"name": "user : bash — Konsole",
"percent": 0.6,
"swallows": [
{
"class": "^konsole$"
}
],
"type": "con"
}

{
"border": "normal",
"current_border_width": 0,
"floating": "auto_off",
"geometry": {
"height": 664,
"width": 740,
"x": 0,
"y": 0
},
"name": "[No Name] - GVIM",
"percent": 0.4,
"swall
ows":
[
{
"class": "^Gvim$"
}
],
"type": "con"
}

The placeholders do appear as expected, but the windows failed to
swallow into the placeholders.

I have intentionally made the swallowing criteria minimal, because
the
windows failed to swallow with all the criteria provided, but the
windows still failed to swallow after using minimal criteria.

Version of my i3 is 4.11.

There are the `xprop` results of the two windows:
Konsole:
WM_STATE(WM_STATE):
window state: Normal
icon window: 0x0
_NET_WM_USER_TIME(CARDINAL) = 3651183
_NET_WM_STATE(ATOM) = _NET_WM_STATE_MAXIMIZED_HORZ,
_NET_WM_STATE_MAXIMIZED_VERT
XdndAware(ATOM) = BITMAP
WM_NAME(STRING) = "user : bash"
_NET_WM_NAME(UTF8_STRING) = "user : bash — Konsole"
_MOTIF_WM_HINTS(_MOTIF_WM_HINTS) = 0x3, 0x3e, 0x7e, 0x0, 0x0
_NET_WM_WINDOW_TYPE(ATOM) =
_NET_WM_WINDOW_TYPE_NORMAL
_XEMBED_INFO(_XEMBED_INFO) = 0x0, 0x1
WM_CLIENT_LEADER(WINDOW): window id # 0x1400006
WM_HINTS(WM_HINTS):
Client accepts input or input focus: True
Initial state is Normal State.
_NET_WM_PID(CARDINAL) = 2272
WM_CLASS(STRING) = "konsole", "konsole"
WM_PROTOCOLS(ATOM): protocols WM_DELETE_WINDOW, WM_TAKE_FOCUS,
_NET_WM_PING
WM_NORMAL_HINTS(WM_SIZE_HINTS):
user specified size: 1920 by 1060
program specified minimum size: 111 by 65
window gravity: Static

Gvim:
_NET_WM_USER_TIME(CARDINAL) = 3642255
WM_STATE(WM_STATE):
window state: Normal
icon window: 0x0
WM_HINTS(WM_HINTS):
Client accepts input or input focus: True
Initial state is Normal State.
bitmap id # to use for icon: 0x4000021
bitmap id # of mask for icon: 0x400002
4

window id # of group leader: 0x4000001
XdndAware(ATOM) = BITMAP
_MOTIF_DRAG_RECEIVER_INFO(_MOTIF_DRAG_RECEIVER_INFO) = 0x6c, 0x0,
0x5,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0
Vim(STRING) = "7.4"
_NET_WM_ICON (**removed, too big but useless**)
WM_WINDOW_ROLE(STRING) = "vim-3585-396272500-1451001429"
_NET_WM_SYNC_REQUEST_COUNTER(CARDINAL) = 67108869
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_NORMAL
_NET_WM_USER_TIME_WINDOW(WINDOW): window id # 0x4000004
WM_CLIENT_LEADER(WINDOW): window id # 0x4000001
_NET_WM_PID(CARDINAL) = 3585
WM_LOCALE_NAME(STRING) = "zh_TW.utf8"
WM_CLIENT_MACHINE(STRING) = "kelvin-gentoo"
WM_NORMAL_HINTS(WM_SIZE_HINTS):
program specified minimum size: 128 by 109
program specified resize increment: 9 by 22
program specified base size: 20 by 65
window gravity: NorthWest
WM_PROTOCOLS(ATOM): protocols
WM_DELETE_WINDOW, WM_TAKE_FOCUS,
_NET_WM_PING, _NET_WM_SYNC_REQUEST
WM_CLASS(STRING) = "gvim", "Gvim"
WM_ICON_NAME(STRING) = "[No Name] - GVIM"
_NET_WM_ICON_NAME(UTF8_STRING) = "[No Name] - GVIM"
WM_NAME(STRING) = "[No Name] - GVIM"
_NET_WM_NAME(UTF8_STRING) = "[No Name] - GVIM"

What's wrong with the layout file? Thank you.

Regards,
Kelvin


Other related posts: