Simon's last changes lead to segfaults when the users specified <Sticky> or
<Workspace> in apps-file. Reason is, that an unmanaged window is not yet assigned to an workspace and thus the returned workspacenumber is -1 ... which leads in combination with getWorkspace(nr) to an invalid workspace (0x0) ... This also fixes the problem with several deiconify-modes of the iconbar, when the iconbar is in icons-only mode (same reason) The other changes in the files are just cosmetic, i throw out the comments about the changes Simon did coz they make sense and are correct imho.
This commit is contained in:
parent
1657de3cef
commit
0c74e8c935
2 changed files with 9 additions and 25 deletions
|
@ -81,20 +81,17 @@ public:
|
||||||
m_win.screen().sendToWorkspace(m_win.screen().currentWorkspaceID(), &m_win);
|
m_win.screen().sendToWorkspace(m_win.screen().currentWorkspaceID(), &m_win);
|
||||||
} else {
|
} else {
|
||||||
m_win.screen().changeWorkspaceID(m_win.workspaceNumber());
|
m_win.screen().changeWorkspaceID(m_win.workspaceNumber());
|
||||||
m_win.raiseAndFocus();
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case IconbarTool::CURRENT:
|
case IconbarTool::CURRENT:
|
||||||
m_win.screen().sendToWorkspace(m_win.screen().currentWorkspaceID(), &m_win);
|
m_win.screen().sendToWorkspace(m_win.screen().currentWorkspaceID(), &m_win);
|
||||||
m_win.raiseAndFocus();
|
|
||||||
break;
|
break;
|
||||||
case IconbarTool::FOLLOW:
|
case IconbarTool::FOLLOW:
|
||||||
default:
|
default:
|
||||||
m_win.screen().changeWorkspaceID(m_win.workspaceNumber());
|
m_win.screen().changeWorkspaceID(m_win.workspaceNumber());
|
||||||
m_win.raiseAndFocus();
|
|
||||||
break;
|
break;
|
||||||
};
|
};
|
||||||
|
m_win.raiseAndFocus();
|
||||||
} else
|
} else
|
||||||
m_win.iconify();
|
m_win.iconify();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1219,11 +1219,7 @@ FluxboxWindow *BScreen::createWindow(Window client) {
|
||||||
focused_list.push_front(&win->winClient());
|
focused_list.push_front(&win->winClient());
|
||||||
else
|
else
|
||||||
focused_list.push_back(&win->winClient());
|
focused_list.push_back(&win->winClient());
|
||||||
|
|
||||||
// if (new_win) {
|
|
||||||
// Fluxbox::instance()->attachSignals(*win);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// we also need to check if another window expects this window to the left
|
// we also need to check if another window expects this window to the left
|
||||||
// and if so, then join it.
|
// and if so, then join it.
|
||||||
FluxboxWindow *otherwin = 0;
|
FluxboxWindow *otherwin = 0;
|
||||||
|
@ -1242,11 +1238,6 @@ FluxboxWindow *BScreen::createWindow(Window client) {
|
||||||
FluxboxWindow *BScreen::createWindow(WinClient &client) {
|
FluxboxWindow *BScreen::createWindow(WinClient &client) {
|
||||||
|
|
||||||
if (isKdeDockapp(client.window()) && addKdeDockapp(client.window())) {
|
if (isKdeDockapp(client.window()) && addKdeDockapp(client.window())) {
|
||||||
// we need to save old handler and readd it later
|
|
||||||
// I think rearranging the logic negates the need for this - sb 04jan2005
|
|
||||||
// FbTk::EventManager *evm = FbTk::EventManager::instance();
|
|
||||||
// FbTk::EventHandler *evh = evm->find(client.window());
|
|
||||||
// evm->add(*evh, client.window());
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1254,24 +1245,17 @@ FluxboxWindow *BScreen::createWindow(WinClient &client) {
|
||||||
winFrameTheme(),
|
winFrameTheme(),
|
||||||
*layerManager().getLayer(Fluxbox::instance()->getNormalLayer()));
|
*layerManager().getLayer(Fluxbox::instance()->getNormalLayer()));
|
||||||
|
|
||||||
// Why not KDE? - sb 04jan2005
|
|
||||||
// if (!isKdeDockapp(client.window())) {
|
|
||||||
#ifdef SLIT
|
#ifdef SLIT
|
||||||
if (win->initialState() == WithdrawnState && slit() != 0) {
|
if (win->initialState() == WithdrawnState && slit() != 0) {
|
||||||
slit()->addClient(win->clientWindow());
|
slit()->addClient(win->clientWindow());
|
||||||
}
|
}
|
||||||
#endif // SLIT
|
#endif // SLIT
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
if (!win->isManaged()) {
|
if (!win->isManaged()) {
|
||||||
delete win;
|
delete win;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
// don't add to focused_list, as it should already be in there (since the
|
|
||||||
// WinClient already exists).
|
|
||||||
|
|
||||||
// Fluxbox::instance()->attachSignals(*win);
|
|
||||||
|
|
||||||
m_clientlist_sig.notify();
|
m_clientlist_sig.notify();
|
||||||
|
|
||||||
|
@ -1355,7 +1339,10 @@ void BScreen::reassociateWindow(FluxboxWindow *w, unsigned int wkspc_id,
|
||||||
// gets updated
|
// gets updated
|
||||||
m_clientlist_sig.notify();
|
m_clientlist_sig.notify();
|
||||||
} else if (ignore_sticky || ! w->isStuck()) {
|
} else if (ignore_sticky || ! w->isStuck()) {
|
||||||
getWorkspace(w->workspaceNumber())->removeWindow(w, true);
|
// fresh windows have workspaceNumber == -1, which leads to
|
||||||
|
// an invalid workspace (unsigned int)
|
||||||
|
if (getWorkspace(w->workspaceNumber()))
|
||||||
|
getWorkspace(w->workspaceNumber())->removeWindow(w, true);
|
||||||
getWorkspace(wkspc_id)->addWindow(*w);
|
getWorkspace(wkspc_id)->addWindow(*w);
|
||||||
// see comment above
|
// see comment above
|
||||||
m_clientlist_sig.notify();
|
m_clientlist_sig.notify();
|
||||||
|
|
Loading…
Reference in a new issue