┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/panels
diff options
context:
space:
mode:
authorSebastian Dörner <[email protected]>2011-06-01 21:51:22 +0100
committerSebastian Dörner <[email protected]>2011-06-01 21:53:44 +0100
commit0a7c5997df75455c08e951233d8b87720409c865 (patch)
treef2a2d817d839d2547d8adabb6e41d9423523633b /src/panels
parentaf37efda77571ccdef5a972e210c0afd1f7f3394 (diff)
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
Diffstat (limited to 'src/panels')
-rw-r--r--src/panels/terminal/terminalpanel.cpp9
-rw-r--r--src/panels/terminal/terminalpanel.h2
2 files changed, 7 insertions, 4 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("/"));
}
diff --git a/src/panels/terminal/terminalpanel.h b/src/panels/terminal/terminalpanel.h
index 288cb05d3..cc27212e8 100644
--- a/src/panels/terminal/terminalpanel.h
+++ b/src/panels/terminal/terminalpanel.h
@@ -44,7 +44,7 @@ public:
public slots:
void terminalExited();
- void visibilityChanged(bool visible);
+ void dockVisibilityChanged();
signals:
void hideTerminalPanel();