┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/panels/terminal/terminalpanel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/panels/terminal/terminalpanel.cpp')
-rw-r--r--src/panels/terminal/terminalpanel.cpp9
1 files changed, 6 insertions, 3 deletions
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("/"));
}