Panel disappears when changing tty with wayfire
Update report
Original report
summary
When running xfce4-panel on a Wayland compositor (specifically tested on wayfire, but potentially affecting others), the panel does not gracefully handle cases where the output (monitor) is temporarily replaced by a placeholder virtual output like NOOP-1.
This situation commonly occurs when a user switches to another TTY and then back. The compositor drops the physical output and creates a temporary virtual output NOOP. I guess the fatal problem is that, NOOP might be sized as 0x0. xfce4-panel attempts to register a layer-shell surface on this 0x0 output with fixed dimensions, which violates the expected behaviour of the Layer Shell protocol and can lead to a compositor crash or a panel segmentation fault.
Though the compositor should be to blame to not deal with this issue gracefully (at least it can kill xfce4-panel instead of segfault and dying itself), xfce4-panel should also check its behaviour about such situation.
Logs attached. Though xfce4-panel does not appear in the log. I find that killing xfce4-panel before switching to another TTY will skip the problem, so that xfce4-panel must be one of the causes of this bug
Way to produce
- Run wayfire and the run xfce4-panel
- switch to tty
- see wayfire segfault
expected correct behavior
xfce4-panel maybe should try detecting output size before register layer shell surface.