1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-01-07 22:34:18 +01:00

Fixed the no-go-away problem with closing shaded windows. This also

fixes a memory leak (the window didn't go away because its destroy
function was not actually called. Also non-shaded windows were
unmapped, but not destroyed either, so they just apparently went away).
This commit is contained in:
dan
2001-01-01 08:39:26 +00:00
parent a8ab51747d
commit 9093cde817

View File

@@ -129,7 +129,9 @@ createView(W_Screen *screen, W_View *parent)
adoptChildView(parent, view);
}
view->refCount = 1;
view->eventHandlers = WMCreateBag(4);
return view;
@@ -465,8 +467,11 @@ destroyView(W_View *view)
void
W_DestroyView(W_View *view)
{
if (view->refCount == 0)
destroyView(view);
view->refCount--;
if (view->refCount < 1) {
destroyView(view);
}
}
@@ -672,7 +677,7 @@ W_ReleaseView(WMView *view)
{
view->refCount--;
if (view->refCount < 0) {
if (view->refCount < 1) {
destroyView(view);
}
}