all repos — fluxbox @ b47f050367409a26f70e57f130aedde3005589ea

custom fork of the fluxbox windowmanager

cosmetic (tabs -> spaces)
fix possible memleak with XineramaQueryScreens:
    "Returned array should be free with XFree()" (from Xinerama.h)
mathias mathias
commit

b47f050367409a26f70e57f130aedde3005589ea

parent

5525d29b9b1d517035fa440f759fa33cb8432c03

1 files changed, 9 insertions(+), 8 deletions(-)

jump to
M src/Screen.ccsrc/Screen.cc

@@ -453,7 +453,7 @@ Fluxbox *fluxbox = Fluxbox::instance();

// 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 @@

// 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 @@ }

// 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 @@ // search forward for transient_for

// 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 @@ }

// reevaluate window if (!fluxbox->validateWindow(children[i])) continue; - + #ifdef DEBUG cerr<<"BScreen::initWindows(): j = "<<j<<" i = "<<i<<" nchild = "<<nchild<<endl; #endif // DEBUG - + #ifdef DEBUG if (j < nchild) cerr<<"BScreen::initWindows(): postpone creation of 0x"<<hex<<children[j]<<dec<<endl;

@@ -524,7 +524,7 @@ cerr<<"BScreen::initWindows(): transient_for = 0x"<<hex<<transient_for<<dec<<endl;

#endif // DEBUG } - + XWindowAttributes attrib; if (XGetWindowAttributes(disp, children[i], &attrib)) {

@@ -580,7 +580,7 @@ }

unsigned int BScreen::maxTop(int head) const { // we ignore strut if we're doing full maximization - + if (hasXinerama()) return doFullMax() ? getHeadY(head) : getHeadY(head) + availableWorkspaceArea(head)->top(); else

@@ -2252,6 +2252,7 @@ m_xinerama_headinfo[i].y = screen_info[i].y_org;

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 ="<<number<<endl; #endif // DEBUG