From 0a7c5997df75455c08e951233d8b87720409c865 Mon Sep 17 00:00:00 2001 From: Sebastian Dörner Date: Wed, 1 Jun 2011 21:51:22 +0100 Subject: Fix problems with commit 8d789f2626243d - fix crash when Ctrl-D-ing in the terminal - don't respond to window manager actions, only when the dock itself is hidden Refers to commit 8d789f2626243ddc6c763c84e582e8e20afe7689 --- src/panels/terminal/terminalpanel.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/panels/terminal/terminalpanel.cpp') diff --git a/src/panels/terminal/terminalpanel.cpp b/src/panels/terminal/terminalpanel.cpp index b45be621a..b3bf0506f 100644 --- a/src/panels/terminal/terminalpanel.cpp +++ b/src/panels/terminal/terminalpanel.cpp @@ -50,13 +50,16 @@ TerminalPanel::~TerminalPanel() void TerminalPanel::terminalExited() { - emit hideTerminalPanel(); m_terminal = 0; + emit hideTerminalPanel(); } -void TerminalPanel::visibilityChanged(bool visible) +void TerminalPanel::dockVisibilityChanged() { - if (!visible && m_terminal && (m_terminal->foregroundProcessId() == -1)) { + // Only react when the DockWidget itself (not some parent) is hidden. This way we don't + // respond when e.g. Dolphin is minimized. + if (parentWidget() && parentWidget()->isHidden() && + m_terminal && (m_terminal->foregroundProcessId() == -1)) { // Make sure this terminal does not prevent unmounting any removable drives changeDir(KUrl::fromPath("/")); } -- cgit v1.3