>>
>> As for the dock app problem, I know what the problem is just not the
>> solution.
> I noticed two points (may be, you already know?):  
>  - if wmhints.icon_window is set to None, that works perfectly.
>  - if Blakbox is restarted, all dock apps are back to the slit.
> 
> I think it is the case when icon_window == client_window that causes the 
> problem. I join a little patch (for blackbox-0.65.0alpha2) that seems to 
> correct the problem, but I am not sure of the consequences.
> 

Thanks for the detective work.  You found the cause of the problem I was seeing.

The reason the app was being spit out of the slit was an UnmapNotify was being
received.  Blackbox happily honoured it.  This unmap was being caused by the
following chain of events:

// both windows are unmapped here

if icon_window:
    client->window = icon_window
    XMoveWindow(main_window, screen->width + 10, screen->height + 10)
    XMapWindow(main_window)

XReparentWindow(client->window, slit)
XMapRaised(client->window)

The problem is XReparentWindow generates an UnmapNotify, this is usually
ignored because no unmaps are generated when a window is already unmapped. 
However in this case since icon_window == main_window it was mapped so an unmap
event came through.

My solution was simply to remove the XMoveWindow() and XMapWindow() call when
icon_window is true.  I see no evidence of similar behaviour in WindowMaker.

You may be asking why this problem appears now.  Before the X Server was
grabbed during the creation of the slit client so no events were generated. 
Since we removed the grabs the events started leaking in.

Thanks again Duret for taking the time, Brad and I have been busy with life and
other things.

Reply via email to