Skip to content
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

[Bug]: xwindow module seems to sabotage xworkspaces urgency notifications #3122

Open
5 tasks done
FrancisRussell opened this issue May 10, 2024 · 0 comments
Open
5 tasks done

Comments

@FrancisRussell
Copy link

FrancisRussell commented May 10, 2024

Checklist

  • I have read the appropriate section in the contributing guidelines
  • I believe this issue is a problem with polybar itself and not a misconfiguration on my part
  • I have searched for other open and closed issues that may have already reported this problem
  • I have checked the known issues page for this problem.
  • I have followed the debugging guide to narrow down the problem to a minimal config.

Steps to reproduce

  1. Run polybar with Xmonad as the windows manager and Xmonad's EWMH functionality enabled.
  2. Run alacritty, or xterm with XTerm.VT100.bellIsUrgent: true in ~/.Xresources, run sleep 10 && echo -e "\a" then switch to another workspace.

Minimal config

[colours]
primary = #F0C674
red = #E02E2E

[bar/top]
modules-left = xworkspaces xwindow

[module/xworkspaces]
type = internal/xworkspaces
label-active-background = ${colours.primary}
label-urgent-background = ${colours.red}

[module/xwindow]
type = internal/xwindow

Polybar log

With xwindow module present:
polybar|notice:  Parsing config file: /home/fpr/.config/polybar/config.ini
polybar|trace: config_parser: Parsing /home/fpr/.config/polybar/config.ini
polybar|warn:  No monitor specified, using "LVDS-0"
polybar|info:  Loaded monitor LVDS-0 (1680x1050+0+0)
polybar|info:  Configured DPI = 96x96
polybar|info:  Bar geometry: 1680x24+0+0; Borders: 0,0,0,0
polybar|trace: bar: Attach X event sink
polybar|trace: bar: Attach signal receiver
polybar|trace: controller: Setup user-defined modules
polybar|notice:  Loading module 'xworkspaces' of type 'internal/xworkspaces'
polybar|notice:  Loading module 'xwindow' of type 'internal/xwindow'
polybar|notice:  Loaded 2 modules
polybar|info:  Starting application
polybar|trace: controller: Main thread id = 1
polybar|info:  Entering event loop (thread-id=1)
polybar|trace: bar: Create renderer
polybar|trace: renderer: Get TrueColor visual
polybar|info:  renderer: Using 32-bit TrueColor visual: 0x23
polybar|trace: renderer: Allocate colormap
polybar|trace: renderer: Allocate output window
polybar|trace: renderer: Allocate window pixmaps
polybar|trace: renderer: Allocate graphic contexts
polybar|trace: renderer: Allocate alignment blocks
polybar|trace: renderer: Allocate cairo components
polybar|trace: renderer: Load fonts
polybar|warn:  No fonts specified, using fallback font "fixed"
polybar|notice:  Loaded font "fixed" (name=Noto Sans, offset=0, file=/usr/share/fonts/truetype/noto/NotoSans-Regular.ttf)
polybar|info:  Bar window: 0x1a00001
polybar|trace: bar: Reconfigure window
polybar|trace: bar: Set window WM_NAME
polybar|trace: bar: Set window _NET_WM_WINDOW_TYPE
polybar|trace: bar: Set window _NET_WM_STATE
polybar|trace: bar: Set window _NET_WM_DESKTOP
polybar|trace: bar: Set window _NET_WM_PID
polybar|trace: bar: Map window
polybar|trace: background_manager: update_geometry
polybar|trace: background_manager: deactivating because there are no slices to observe
polybar|trace: bar: Draw empty bar
polybar|trace: bar: Setup tray manager
polybar|info:  Starting module/xworkspaces
polybar|info:  Starting module/xwindow
polybar|info:  module/xworkspaces: Rebuilding cache
polybar|info:  module/xwindow: Rebuilding cache
polybar|trace: bar: Force update
polybar|info:  Redrawing bar window
polybar|trace: renderer: flush(1 geom=380x24+0+0, falloff=0)
polybar|trace: bar: Received expose event
polybar|info:  module/xworkspaces: Rebuilding cache
polybar|info:  module/xwindow: Rebuilding cache
polybar|info:  Redrawing bar window
polybar|trace: renderer: flush(1 geom=224x24+0+0, falloff=0)
polybar|info:  module/xwindow: Rebuilding cache
polybar|trace: bar: Ignoring update (unchanged)
polybar|info:  module/xwindow: Rebuilding cache
polybar|trace: bar: Ignoring update (unchanged)
polybar|info:  module/xwindow: Rebuilding cache
polybar|trace: bar: Ignoring update (unchanged)
polybar|info:  module/xworkspaces: Rebuilding cache
polybar|info:  module/xwindow: Rebuilding cache
polybar|info:  Redrawing bar window
polybar|trace: renderer: flush(1 geom=117x24+0+0, falloff=0)
polybar|info:  module/xworkspaces: Rebuilding cache
polybar|info:  module/xwindow: Rebuilding cache
polybar|info:  Redrawing bar window
polybar|trace: renderer: flush(1 geom=117x24+0+0, falloff=0)
polybar|info:  module/xworkspaces: Rebuilding cache
polybar|info:  module/xwindow: Rebuilding cache
polybar|info:  Redrawing bar window
polybar|trace: renderer: flush(1 geom=117x24+0+0, falloff=0)
polybar|info:  module/xworkspaces: Rebuilding cache
polybar|info:  module/xwindow: Rebuilding cache
polybar|info:  Redrawing bar window
polybar|trace: renderer: flush(1 geom=380x24+0+0, falloff=0)
polybar|info:  module/xworkspaces: Rebuilding cache
polybar|trace: bar: Ignoring update (unchanged)
polybar|info:  module/xworkspaces: Rebuilding cache
polybar|trace: bar: Ignoring update (unchanged)

With xwindow module not-present:
polybar|notice:  Parsing config file: /home/fpr/.config/polybar/config.ini
polybar|trace: config_parser: Parsing /home/fpr/.config/polybar/config.ini
polybar|warn:  No monitor specified, using "LVDS-0"
polybar|info:  Loaded monitor LVDS-0 (1680x1050+0+0)
polybar|info:  Configured DPI = 96x96
polybar|info:  Bar geometry: 1680x24+0+0; Borders: 0,0,0,0
polybar|trace: bar: Attach X event sink
polybar|trace: bar: Attach signal receiver
polybar|trace: controller: Setup user-defined modules
polybar|notice:  Loading module 'xworkspaces' of type 'internal/xworkspaces'
polybar|notice:  Loaded 1 modules
polybar|info:  Starting application
polybar|trace: controller: Main thread id = 1
polybar|info:  Entering event loop (thread-id=1)
polybar|trace: bar: Create renderer
polybar|trace: renderer: Get TrueColor visual
polybar|info:  renderer: Using 32-bit TrueColor visual: 0x23
polybar|trace: renderer: Allocate colormap
polybar|trace: renderer: Allocate output window
polybar|trace: renderer: Allocate window pixmaps
polybar|trace: renderer: Allocate graphic contexts
polybar|trace: renderer: Allocate alignment blocks
polybar|trace: renderer: Allocate cairo components
polybar|trace: renderer: Load fonts
polybar|warn:  No fonts specified, using fallback font "fixed"
polybar|notice:  Loaded font "fixed" (name=Noto Sans, offset=0, file=/usr/share/fonts/truetype/noto/NotoSans-Regular.ttf)
polybar|info:  Bar window: 0x1a00001
polybar|trace: bar: Reconfigure window
polybar|trace: bar: Set window WM_NAME
polybar|trace: bar: Set window _NET_WM_WINDOW_TYPE
polybar|trace: bar: Set window _NET_WM_STATE
polybar|trace: bar: Set window _NET_WM_DESKTOP
polybar|trace: bar: Set window _NET_WM_PID
polybar|trace: bar: Map window
polybar|trace: background_manager: update_geometry
polybar|trace: background_manager: deactivating because there are no slices to observe
polybar|trace: bar: Draw empty bar
polybar|trace: bar: Setup tray manager
polybar|info:  Starting module/xworkspaces
polybar|trace: bar: Received expose event
polybar|info:  module/xworkspaces: Rebuilding cache
polybar|trace: bar: Force update
polybar|info:  Redrawing bar window
polybar|trace: renderer: flush(1 geom=117x24+0+0, falloff=0)
polybar|info:  module/xworkspaces: Rebuilding cache
polybar|info:  Redrawing bar window
polybar|trace: renderer: flush(1 geom=117x24+0+0, falloff=0)
polybar|info:  module/xworkspaces: Rebuilding cache
polybar|info:  Redrawing bar window
polybar|trace: renderer: flush(1 geom=117x24+0+0, falloff=0)
polybar|info:  module/xworkspaces: Rebuilding cache
polybar|trace: bar: Ignoring update (unchanged)
polybar|info:  module/xworkspaces: Rebuilding cache
polybar|trace: bar: Ignoring update (unchanged)
polybar|info:  module/xworkspaces: Rebuilding cache
polybar|info:  Redrawing bar window
polybar|trace: renderer: flush(1 geom=117x24+0+0, falloff=0)
polybar|info:  module/xworkspaces: Rebuilding cache
polybar|trace: bar: Ignoring update (unchanged)
polybar|info:  module/xworkspaces: Rebuilding cache
polybar|info:  Redrawing bar window
polybar|trace: renderer: flush(1 geom=117x24+0+0, falloff=0)

Expected behavior

After 10 seconds I expect the workspace containing the shell emitting the alert to turn red in polybar.

Actual behavior

The workspace containing the alert does not change appearance even after a long wait.

Switching to a different workspace causes the workspace containing the alerting shell to be marked red.

Moving the mouse around (which on Xmonad causes the window focus to change) can also be used to cause the urgency colour to appear but it seems non-deterministic, with at least two focus changes necessary before this happens.

Window Manager and Version

xmonad 0.17.2

Linux Distribution

Debian bookworm (but polybar installed from unstable)

Polybar version

polybar 3.7.1

Features: +alsa +curl +i3 +mpd +network(libnl) +pulseaudio +xkeyboard

X extensions: +randr (+monitors) +composite +xkb +xrm +xcursor

Debian package, build flags removed from output for build reproducibility
You can refer to the build logs of your package at:
https://buildd.debian.org/status/package.php?p=polybar

Additional Context / Screenshots

While attempting to produce a minimal example, I discovered the problem vanished. If I remove the xwindow entry from modules-left the workspace is immediately marked urgent when the echo occurs as expected.

@FrancisRussell FrancisRussell changed the title [Bug]: xwindow module seems to sabotage urgency notifications [Bug]: xwindow module seems to sabotage xworkspaces's urgency notifications May 10, 2024
@FrancisRussell FrancisRussell changed the title [Bug]: xwindow module seems to sabotage xworkspaces's urgency notifications [Bug]: xwindow module seems to sabotage xworkspaces urgency notifications May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant