Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

split + layout stacked / tabbed creates redundant containers #3001

Closed
orestisfl opened this issue Sep 30, 2017 · 10 comments · Fixed by #5469 · May be fixed by #4208
Closed

split + layout stacked / tabbed creates redundant containers #3001

orestisfl opened this issue Sep 30, 2017 · 10 comments · Fixed by #5469 · May be fixed by #4208
Assignees
Labels
4.14 bug reproducible A bug that has been reviewed and confirmed by a project contributor

Comments

@orestisfl
Copy link
Member

Output of i3 --moreversion 2>&- || i3 --version:

Binary i3 version:  4.14-128-gc08ef361 (2017-09-29, branch "next") © 2009 Michael Stapelberg and contributors

URL to a logfile as per https://i3wm.org/docs/debugging.html:

https://logs.i3wm.org/logs/5637036128075776.bz2

What I did:

  1. fresh workspace
  2. open window
  3. layout stacked
  4. open window
  5. split v
  6. layout stacked
  7. repeat 5-6

What I saw:

2017-09-30-042426_1680x1009

Repeating this too many times makes i3 unbearably slow and memory usage skyrockets.

What I expected instead:
Redundant stacked / tabbed containers should not be opened.

@Airblader
Copy link
Member

IMHO this is the correct behavior. Why should we close this (valid) container that has been intentionally created? You can move a window into each of those stacked containers (just do your steps, open a second window and move up a few times).

(Although, oddly, move down a single time immediately moves it all the way to the first window)

@stapelberg CC

@orestisfl
Copy link
Member Author

Hmm. I understand the behavior a bit better right now but the same thing (intentionally) doesn't happen for layout splith && splitv.

I think it's less confusing if we apply the same to stacked / tabbed containers instead of allowing this:
out

@roobre
Copy link

roobre commented Nov 12, 2017

I'm suffering a similar issue on Binary i3 version: 4.14.1. When a new workspace is created in certain mode, and then I issue a layout change (for example, layout toggle split in tabbed container, or layout tabbed on a split container), a redundant container bar at top is created.

For example, if I create a new container with workspace_layout split (default), and then I issue layout tabbed, I get:

deepin-screenshot j28535

This behaviour is diferent to what i3 did before, where this redundant top bar was not shown.

Full version output:

Running i3 version: 4.14.1 (2017-09-24) (pid 5061)abort…)
Loaded i3 config: /home/roobre/.i3/config (Last modified: Sun 05 Nov 2017 04:22:58 PM CET, 610933 seconds ago)

The i3 binary you just called: /usr/bin/i3
The i3 binary you are running: i3

@orestisfl
Copy link
Member Author

The offending line for the slowdown is this render_con:

i3/src/render.c

Lines 164 to 170 in 6f11b6f

if ((child = TAILQ_FIRST(&(con->focus_head)))) {
/* By rendering the stacked container again, we handle the case
* that we have a non-leaf-container inside the stack. In that
* case, the children of the non-leaf-container need to be raised
* as well. */
render_con(child, false);
}

@roobre
Copy link

roobre commented May 2, 2018

I forgot to comment that on i3 version 4.15-36-g670dfa0b (2018-03-19, branch "next") I no longer suffer this issue. I'm not sure if this was fixed exactly on that version, but since I switched to the next branch it is gone. Glad to see it fixed, btw, it was really annoying. Great work!

@orestisfl
Copy link
Member Author

@roobre weird, I still get this behaviour.

@roobre
Copy link

roobre commented May 5, 2018

@orestisf1993 What default workspace_layout are you using? I certainly do not get extra containers using tabbed, after switching to split with layout toggle split.

@orestisfl
Copy link
Member Author

@roobre With the default i3 config: open fresh workspace, $mod+w (layout tabbed), open windows

@mgarort
Copy link

mgarort commented Jan 4, 2021

First of all, I want to say thank you to the developers. i3 has really changed my workflow for the better and is my second favorite program ever, only beaten by Vim. So thanks!

Now, IMVHO, and putting aside the memory issue, I think this behaviour is not helpful. I arrived to this issue coming from this Reddit question and looking for a way to disable (or at least avoid) this behaviour of empty stacked containers. Everytime this has happened to me it has been by mistake and it was a small inconvenience that I had to get rid of. Furthermore, sometimes the resulting layout is not intuitive at all and I have to try a few times until I find out how to collapse the empty containers.

In my case, I think it mostly happens when I first do layout tabbed and later do split toggle. The only "solution" I can think of is to not create a keybinding for split toggle, but obviously this would be at the cost of not being able to toggle between new horizontal and vertical splits, so I haven't gone down this road yet.

@usersina
Copy link

This suddenly started happening for me when I uninstalled terminator and installed termite. At the same time, I suddenly started having this issue too.

Running i3 version: 4.20.1 (2021-11-03) (pid 11496)
Loaded i3 config:
  /home/sina/.config/i3/config (main) (last modified: Sun Jun 26 18:57:32 2022, 295 seconds ago)

The i3 binary you just called: /usr/bin/i3
The i3 binary you are running: i3

orestisfl added a commit to orestisfl/i3 that referenced this issue Apr 2, 2023
stapelberg pushed a commit that referenced this issue Jan 31, 2024
@orestisfl orestisfl self-assigned this Jan 31, 2024
mayfield pushed a commit to mayfield/i3 that referenced this issue Feb 4, 2024
desmana pushed a commit to desmana/i3 that referenced this issue Apr 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.14 bug reproducible A bug that has been reviewed and confirmed by a project contributor
Projects
None yet
6 participants