X11 window event mask erroneously removed
I think it's a regression introduced when switching to WnckHandle. When two different handles are used by the same process and one of them is released, the finalization of its wnck windows removes WNCK_APP_WINDOW_EVENT_MASK
from the corresponding X11 windows. As a result, the remaining handle no longer receives PropertyChange events for these windows, until the creation of a new handle reapplies the mask.
My use case is with xfce4-panel (which I maintain): xfce4-panel's tasklist plugin still uses deprecated APIs, so the default handle, while the pager plugin uses wnck_pager_new_with_handle()
with a dedicated handle (so as not to be affected by icon size changes in the rest of the panel). If I add and then remove the pager plugin (so that its handle is released), the tasklist plugin no longer receives any signals from existing windows.
I'm not sure how this should be fixed, whether a counter should be introduced or something else... I checked that commenting out this instruction "fixed the issue", but I didn't go any further.