revert 4055, caused crashes plus it should be done differently
simonb simonb
2 files changed,
18 insertions(+),
12 deletions(-)
M
src/Window.cc
→
src/Window.cc
@@ -504,8 +504,19 @@ decorations.tab = false; //no tab for this window
} associateClientWindow(true, wattrib.x, wattrib.y, wattrib.width, wattrib.height); + + + Fluxbox::instance()->attachSignals(*this); + + // this window is managed, we are now allowed to modify actual state + m_initialized = true; + + + applyDecorations(true); + grabButtons(); + restoreAttributes(); if (m_workspace_number < 0 || m_workspace_number >= screen().getCount())@@ -537,6 +548,8 @@ wattrib.width = 1;
if (wattrib.height <= 0) wattrib.height = 1; + + // if we're a transient then we should be on the same layer as our parent if (m_client->isTransient() && m_client->transientFor()->fbwindow() &&@@ -556,10 +569,13 @@
if (!place_window) moveResize(frame().x(), frame().y(), frame().width(), frame().height()); + + screen().getWorkspace(m_workspace_number)->addWindow(*this, place_window); setWorkspace(m_workspace_number); + if (shaded) { // start shaded shaded = false; shade();@@ -578,10 +594,6 @@ stuck = false;
stick(); deiconify(); //we're omnipresent and visible } - - Fluxbox::instance()->attachSignals(*this); - // this window is managed, we are now allowed to modify actual state - m_initialized = true; sendConfigureNotify(); // no focus default@@ -3533,14 +3545,6 @@ return;
#ifdef DEBUG cerr<<"restore("<<remap<<")"<<endl; #endif // DEBUG - - if (isShaded()) { - if (!isIconic()) - setState(NormalState, false); - if (frame().isShaded()) - frame().shade(); - } - while (!clientList().empty()) { restore(clientList().back(), remap); // deleting winClient removes it from the clientList