8000 xworkspaces missing monitor · Issue #1849 · polybar/polybar · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
xworkspaces missing monitor #1849
Closed
@Lomadriel

Description

@Lomadriel

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

polybar

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:

unsigned int step;
if (bounds.size() > 0) {
step = m_desktop_names.size() / bounds.size();
} else {
step = 1;
}

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.

for (unsigned int index = offset; index < offset + step; index++) {
viewport->desktops.emplace_back(make_unique<struct desktop>(index, offset, desktop_state::EMPTY, label_t{}));
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0