leftwm / leftwm

A tiling window manager for Adventurers
http://leftwm.org
MIT License
2.88k stars 187 forks source link

Empty active tag (polybar) #1280

Open DrWarpMan opened 3 months ago

DrWarpMan commented 3 months ago

Describe the bug

When polybar is launched, the currently opened tag becomes permanently active, even when you switch to a different one.

  1. I started LeftWM, polybar, and then switched to tag 9. I have no windows open, yet it shows tag 1 is active. image

  2. Now, I am on tag 9, and I do a LeftWM reload (which restarts polybar in the up script), and I switch to tag 5, and now tag 9 is active, yet empty. image

(Unsure whether this is LeftWM-specific and/or polybar specific issue.)

Expected behavior (optional)

Empty tags should not be shown as active.

Steps to reproduce (optional)

  1. Launch LeftWM
  2. Launch polybar
  3. Make sure your current tag is empty
  4. Switch to a different tag
  5. The previous tag will still be shown as active

On the following image, I am on tag 9, and 1 is active, yet empty. image

Relevant log output (optional)

No response

OS / Distro

Linux 6.10.6-arch1-1

Additional System Information (optional)

No response

LeftWM Check

:: LeftWM version: 0.5.1
:: LeftWM git hash: e2ba428
:: Enabled features:  journald-log lefthk x11rb xlib
:: Checking feature dependencies . . .
    -> journald-log OK
    -> lefthk OK
:: Checking for leftwm binaries . . .
    -> Binaries OK 
:: Loading configuration . . .
    -> Configuration loaded OK 
:: Checking keybinds . . .
    -> All keybinds OK
:: Checking environment . . .
    -> Environment OK 
:: Checking theme . . .
    -> Theme OK
qezz commented 2 months ago

I've been digging into some wmctrl & xprop internals, and it turns out the polybar process appears as an active window (e.g. in wmctrl)

~ $ wmctrl -l
0x0120003d  0 laptop Mozilla Firefox
0x10600002  3    N/A polybar-mainbar_eDP-1
0x12a00003  2 laptop sleep 10000
...

respective xprop output

~ $ xprop -id 0x10600002
WM_STATE(WM_STATE):
        window state: Normal
        icon window: <field not available>
_NET_SYSTEM_TRAY_ORIENTATION(CARDINAL) = 0
_NET_SYSTEM_TRAY_COLORS(CARDINAL) = 50629, 51400, 50886, 50629, 51400, 50886, 50629, 51400, 50886, 50629, 51400, 50886
WM_NORMAL_HINTS(WM_SIZE_HINTS):
        program specified location: 0, 0
        program specified size: 2256 by 32
        program specified minimum size: 2256 by 32
        program specified maximum size: 2256 by 32
        program specified base size: 2256 by 32
_NET_WM_PID(CARDINAL) = 245495
_NET_WM_DESKTOP(CARDINAL) = 3
_NET_WM_STATE(ATOM) = _NET_WM_STATE_STICKY, _NET_WM_STATE_ABOVE
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DOCK
WM_CLASS(STRING) = "polybar", "Polybar"
WM_NAME(STRING) = "polybar-mainbar_eDP-1"
_NET_WM_STRUT_PARTIAL(CARDINAL) = 0, 0, 32, 0, 0, 0, 0, 0, 0, 2255, 0, 0
_NET_WM_STRUT(CARDINAL) = 0, 0, 32, 0