Skip to content

Call cont_child() more liberally#3996

Merged
stapelberg merged 1 commit intoi3:nextfrom
orestisfl:i3bar-CONT-bug
Apr 9, 2020
Merged

Call cont_child() more liberally#3996
stapelberg merged 1 commit intoi3:nextfrom
orestisfl:i3bar-CONT-bug

Conversation

@orestisfl
Copy link
Copy Markdown
Member

Following the reproduction instructions from
#3242 (comment)

For me, #3242 happened when the following sequence executed:

  1. Fullscreening window correctly calls stop_child() in
    stop_child();
  2. Xrandr change, reconfig_windows() is called and output->visible is
    set to true in this line:
    walk->visible = true;
  3. When the window's fullscreen is disabled,
    handle_visibility_notify() returns in this line:
    return;

    because previously output->visible was set to true

To fix this, I call cont_child() more leniently since it is a no-op
when the child is not stopped.

Fixes #3242
Closes #3761

Following the reproduction instructions from
i3#3242 (comment)

For me, i3#3242 happened when the following sequence executed:
1. Fullscreening window correctly calls `stop_child()` in
https://github.com/i3/i3/blob/6e24e2ad6f4b1e32cfa27805a3a948d0de50f3b1/i3bar/src/xcb.c#L685
2. Xrandr change, `reconfig_windows()` is called and `output->visible` is
set to `true` in this line:
https://github.com/i3/i3/blob/6e24e2ad6f4b1e32cfa27805a3a948d0de50f3b1/i3bar/src/xcb.c#L1791
3. When the window's fullscreen is disabled,
`handle_visibility_notify()` returns in this line:
https://github.com/i3/i3/blob/6e24e2ad6f4b1e32cfa27805a3a948d0de50f3b1/i3bar/src/xcb.c#L677
because previously `output->visible` was set to `true`

To fix this, I call `cont_child()` more leniently since it is a no-op
when the child is not stopped.

Fixes i3#3242
Closes i3#3761
/* Wake the child only when transitioning from 0 to 1 visible bar.
* We cannot transition from 0 to 2 or more visible bars at once since
* visibility events are delivered to each window separately */
} else {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn’t it be sufficient to only remove lines 676-678 above to fix the specific scenario you’re describing?

I’m not saying we shouldn’t also do the other change, just want to make sure I understand what you’re suggesting :)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you are correct.

IMO reduces the cognitive load and avoids potential future problems.

@stapelberg stapelberg merged commit 016d4a3 into i3:next Apr 9, 2020
@orestisfl orestisfl deleted the i3bar-CONT-bug branch April 9, 2020 08:44
@orestisfl orestisfl mentioned this pull request Apr 12, 2020
7 tasks
stapelberg pushed a commit that referenced this pull request Apr 22, 2020
Following the reproduction instructions from
#3242 (comment)

For me, #3242 happened when the following sequence executed:
1. Fullscreening window correctly calls `stop_child()` in
https://github.com/i3/i3/blob/6e24e2ad6f4b1e32cfa27805a3a948d0de50f3b1/i3bar/src/xcb.c#L685
2. Xrandr change, `reconfig_windows()` is called and `output->visible` is
set to `true` in this line:
https://github.com/i3/i3/blob/6e24e2ad6f4b1e32cfa27805a3a948d0de50f3b1/i3bar/src/xcb.c#L1791
3. When the window's fullscreen is disabled,
`handle_visibility_notify()` returns in this line:
https://github.com/i3/i3/blob/6e24e2ad6f4b1e32cfa27805a3a948d0de50f3b1/i3bar/src/xcb.c#L677
because previously `output->visible` was set to `true`

To fix this, I call `cont_child()` more leniently since it is a no-op
when the child is not stopped.

Fixes #3242
Closes #3761
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

i3status/blocks bar hangs up from time to time

3 participants