Description
Describe the issue
Some workspaces aren't displayed by polybar.
Expected behavior:
All workspaces should be displayed.
Actual behavior:
Some workspaces aren't displayed.
- Did you also experience this bug in an earlier version of polybar? Yes
- If no, what was the last version where this worked correctly? Don't know
To Reproduce
Config:
[bar/example]
modules-center = ewmh
[module/ewmh]
type = internal/xworkspaces
xrandr output:
Screen 0: minimum 8 x 8, current 5360 x 1440, maximum 32767 x 32767
eDP1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 380mm x 210mm
1920x1080 60.04*+ 59.93
[...]
DP1 connected 3440x1440+1920+0 (normal left inverted right x axis y axis) 800mm x 330mm
3440x1440 59.97 + 74.98*
[...]
Open one workspace on the left screen.
Open two workspaces on the right screen.
The last one isn't displayed.
Polybar Log
Nothing relevant in logs.
Screenshots
Environment:
- WM: i3-gaps version 4.16.1
- Distro: Linux 5.2.5-arch1-1-ARCH x86_64 GNU/Linux
- Output of
polybar -vvv
:
polybar 3.4.0
Features: +alsa +curl +i3 +mpd +network(libnl) +pulseaudio +xkeyboard
X extensions: +randr (+monitors) +composite +xkb +xrm +xcursor
Build type: Release
Compiler: /usr/bin/c++
Compiler flags: -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -Wall -Wextra -Wpedantic -O3 -DNDEBUG
Linker flags: -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now
Additional context
The problem comes from this code block:
polybar/src/modules/xworkspaces.cpp
Lines 168 to 173 in 58d72c4
In my example I have three workspaces, bounds.size()=3
and m_desktop_names.size()=3
so step=1
then when we enter into the following loop, there is only one workspace registered for each viewport.
polybar/src/modules/xworkspaces.cpp
Lines 198 to 200 in 58d72c4