fix possible segfaults in DeiconifyMode::SEMIFOLLOW and FOLLOW ...

the raisAndFocus after the sendToWorkspace makes problems, dunno why exactly
so this is still an open issue imho.
This commit is contained in:
mathias 2004-11-28 12:41:57 +00:00
parent 56e699405a
commit c813375f39

View file

@ -76,21 +76,24 @@ public:
void execute() { void execute() {
if(m_win.isIconic() || !m_win.isFocused()) { if(m_win.isIconic() || !m_win.isFocused()) {
switch(m_tool.deiconifyMode()) { switch(m_tool.deiconifyMode()) {
case IconbarTool::CURRENT:
m_win.screen().sendToWorkspace(m_win.screen().currentWorkspaceID(), &m_win);
break;
case IconbarTool::FOLLOW: case IconbarTool::FOLLOW:
m_win.screen().changeWorkspaceID(m_win.workspaceNumber()); m_win.screen().changeWorkspaceID(m_win.workspaceNumber());
m_win.raiseAndFocus();
break; break;
case IconbarTool::SEMIFOLLOW: case IconbarTool::SEMIFOLLOW:
if (m_win.isIconic()) if (m_win.isIconic()) {
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;
case IconbarTool::CURRENT:
default:
m_win.screen().sendToWorkspace(m_win.screen().currentWorkspaceID(), &m_win);
break; break;
}; };
m_win.raiseAndFocus();
} else } else
m_win.iconify(); m_win.iconify();
} }