1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-02-21 17:25:46 +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

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