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

Ensure *each client window* have a size of at least 1px after resize (x11 borders) #3544

Open
xzfc opened this Issue Dec 5, 2018 · 1 comment

Comments

Projects
None yet
3 participants
@xzfc
Contributor

xzfc commented Dec 5, 2018

I'm submitting a…

[x] Bug
[ ] Feature Request
[ ] Documentation Request
[ ] Other (Please describe in detail)

This is partially fixed by #3389, but the bug still persists.

Reproduction Instructions

font pango:sans
bar { }
floating_modifier Mod1
bindsym Mod1+1 workspace 1
exec --no-startup-id xterm -bw 100
exec --no-startup-id xterm -bw 100

Resize the left xterm wide enough using Mod1 + rightclick.

Current Behavior

  • The right xterm segfaults.
  • Corresponding line in the i3 log:
    05/12/18 10:55:33 - x.c:x_push_node:905 - setting window rect (2, 0, -8, 237)
    Note the negative width.
  • xwininfo of the right xterm before it segfaults: -geometry 65528x237-0+20.

i3 log

Causes

As far as I can see, the following things can cause non-positive window size:

  1. X11 borders (xterm -bw 100, described above)
  2. container borders (i3-msg border normal 100px)
  3. container titlebars
  4. split layouts. Consider following example: H1[w H2[w w w]].
    H2 can not be narrower than 3 pixels as each of its children should be at least 1 pixel wide.
    See how bspwm handles this.

i3 version 4.16

@i3 i3 deleted a comment from i3bot Dec 5, 2018

@orestisf1993 orestisf1993 changed the title from Ensure *each client window* have a size of at least 1px after resize to Ensure *each client window* have a size of at least 1px after resize (x11 borders) Dec 5, 2018

@xzfc

This comment has been minimized.

Contributor

xzfc commented Dec 5, 2018

@orestisf1993 x11 borders is one of the possible things that can cause this, but not the only one.

Steps to reproduce without borders, neither X11 nor i3:

  1. Open the following layout: H[w V[w w H[w w w w w w w w w w w w w w w w w w w w w w w w w w]] w] (looks like this). Ensure there is no X11 borders (xterm -bw 0).

  2. Remove all i3 borders: i3-msg '[class="XTerm"]border none'.

  3. Resize rightmost xterm as wide as you can.

Result: some of XTerm windows have width of 0.

$ i3-msg -t get_tree | jq '.. | select (.window_properties?.class == "XTerm") | .window_rect.width'
213
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
426
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment