From c813375f390e7d025c6b699007a7c3e7d03f2e06 Mon Sep 17 00:00:00 2001 From: mathias Date: Sun, 28 Nov 2004 12:41:57 +0000 Subject: 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. --- src/IconButton.cc | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/IconButton.cc b/src/IconButton.cc index 9b5c054..0ed516d 100644 --- a/src/IconButton.cc +++ b/src/IconButton.cc @@ -76,21 +76,24 @@ public: void execute() { if(m_win.isIconic() || !m_win.isFocused()) { switch(m_tool.deiconifyMode()) { - case IconbarTool::CURRENT: - m_win.screen().sendToWorkspace(m_win.screen().currentWorkspaceID(), &m_win); - break; case IconbarTool::FOLLOW: m_win.screen().changeWorkspaceID(m_win.workspaceNumber()); + m_win.raiseAndFocus(); break; case IconbarTool::SEMIFOLLOW: - if (m_win.isIconic()) + if (m_win.isIconic()) { m_win.screen().sendToWorkspace(m_win.screen().currentWorkspaceID(), &m_win); - else + } else { 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; }; - m_win.raiseAndFocus(); } else m_win.iconify(); } -- cgit v0.11.2