From b47f050367409a26f70e57f130aedde3005589ea Mon Sep 17 00:00:00 2001 From: mathias Date: Mon, 22 Nov 2004 19:40:34 +0000 Subject: cosmetic (tabs -> spaces) fix possible memleak with XineramaQueryScreens: "Returned array should be free with XFree()" (from Xinerama.h) --- src/Screen.cc | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/Screen.cc b/src/Screen.cc index 9bb0e2d..ebf2b40 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -453,7 +453,7 @@ void BScreen::initWindows() { // preen the window list of all icon windows... for better dockapp support for (unsigned int i = 0; i < nchild; i++) { - + if (children[i] == None) continue; @@ -480,7 +480,7 @@ void BScreen::initWindows() { // manage shown windows // complexity: O(n^2) if we have lots of transients to transient_for // but usually O(n) - Window transient_for = 0; + Window transient_for = 0; for (unsigned int i = 0; i < nchild; ++i) { if (children[i] == None) continue; @@ -494,7 +494,7 @@ void BScreen::initWindows() { // if we have a transient_for window and it isn't created yet... // postpone creation of this window and find transient_for window - // in the list and swap place with it so we can create transient_for window + // in the list and swap place with it so we can create transient_for window // first if (XGetTransientForHint(disp, children[i], &transient_for) && fluxbox->searchWindow(transient_for) == 0) { @@ -502,7 +502,7 @@ void BScreen::initWindows() { // and swap place with it so it gets created first unsigned int j = i + 1; for (; j < nchild; ++j) { - if (children[j] == transient_for) { + if (children[j] == transient_for) { swap(children[i], children[j]); break; } @@ -510,11 +510,11 @@ void BScreen::initWindows() { // reevaluate window if (!fluxbox->validateWindow(children[i])) continue; - + #ifdef DEBUG cerr<<"BScreen::initWindows(): j = "<top(); else @@ -2252,6 +2252,7 @@ void BScreen::initXinerama() { m_xinerama_headinfo[i].width = screen_info[i].width; m_xinerama_headinfo[i].height = screen_info[i].height; } + XFree(screen_info); #ifdef DEBUG cerr<<"BScreen::initXinerama(): number of heads ="<