geommer / yabar

A modern and lightweight status bar for X window managers.
MIT License
679 stars 49 forks source link

yabar_title: Closing last window on workspace doesn't cause an update #148

Open Narrat opened 7 years ago

Narrat commented 7 years ago

I noticed the following behaviour using yabar with openbox. If I'm on a workspace where I'm closing the last window, its name will still be displayed in yabar_title. Even if I'm opening a new window it will still not update unless I switch workspaces or open a second window.

Three pictures to make it visual (hopefully)

1 2 3

NBonaparte commented 7 years ago

Hi again, could you run xprop -root -spy again while doing the same procedure and report the changes in _NET_ACTIVE_WINDOW?

Narrat commented 7 years ago

Doesn't look promising. As far as I figured it out from the printed messages, the ID is getting reused?

0x600003 = terminal that runs xprop
0x800001 = yabar
0xc00003 = initially scite (before getting closed), but also the first terminal opened after closing scite
0xe00003 = second terminal

_NET_CURRENT_DESKTOP(CARDINAL) = 4
_NET_CLIENT_LIST_STACKING(WINDOW): window id # 0xc00003, 0x600003, 0x800001
_NET_ACTIVE_WINDOW(WINDOW): window id # 0xc00003
_NET_ACTIVE_WINDOW(WINDOW): window id # 0xc00003 # after switch to workspace and scite active window
_NET_CLIENT_LIST(WINDOW): window id # 0x600003, 0x800001 # scite getting closed
_NET_CLIENT_LIST_STACKING(WINDOW): window id # 0x600003, 0x800001 # dito
_NET_CLIENT_LIST_STACKING(WINDOW): window id # 0x600003, 0xc00003, 0x800001 # terminal opened
_NET_CLIENT_LIST_STACKING(WINDOW): window id # 0x600003, 0xc00003, 0x800001
_NET_CLIENT_LIST(WINDOW): window id # 0x600003, 0x800001, 0xc00003
_NET_CLIENT_LIST_STACKING(WINDOW): window id # 0x600003, 0xc00003, 0x800001
_NET_ACTIVE_WINDOW(WINDOW): window id # 0xc00003 # terminal now active window
_NET_CLIENT_LIST_STACKING(WINDOW): window id # 0x600003, 0xe00003, 0xc00003, 0x800001 # another terminal opened
_NET_CLIENT_LIST_STACKING(WINDOW): window id # 0x600003, 0xc00003, 0xe00003, 0x800001
_NET_CLIENT_LIST(WINDOW): window id # 0x600003, 0x800001, 0xc00003, 0xe00003
_NET_CLIENT_LIST_STACKING(WINDOW): window id # 0x600003, 0xc00003, 0xe00003, 0x800001
_NET_ACTIVE_WINDOW(WINDOW): window id # 0xe00003 # that terminal is active
_NET_ACTIVE_WINDOW(WINDOW): window id # 0xe00003
_NET_CURRENT_DESKTOP(CARDINAL) = 0