When restarting, catch unmapped windows as ObUnmanaged objects
When unmanaging a client, ignore the ReparentNotify to root, rather than
thinking the unmanaged window is now embedded somewhere
Also add some ob_debug's for unmanaged event handling
unmanaged_update_opacity(um);
break;
case DestroyNotify:
+ ob_debug("DestroyNotify for unmanaged 0x%lx", window_top(um));
unmanaged_destroy(um);
break;
case MapRequest:
+ ob_debug("MapRequest for unmanaged 0x%lx", window_top(um));
w = window_top(um);
unmanaged_destroy(um);
window_manage(w);
break;
case ReparentNotify:
- unmanaged_destroy(um);
+ /* when we unmanage something it causes a reparent notify also */
+ if (e->xreparent.parent != obt_root(ob_screen)) {
+ ob_debug("ReparentNotify for unmanaged 0x%lx", window_top(um));
+ unmanaged_destroy(um);
+ }
break;
case ConfigureRequest:
xwc.x = e->xconfigurerequest.x;
if (window_find(children[i])) continue; /* skip our own windows */
if (XGetWindowAttributes(obt_display, children[i], &attrib)) {
if (attrib.map_state == IsUnmapped)
- ;
+ unmanaged_new(children[i]);
else
window_manage(children[i]);
}