From 79a7412107551cdb175d3399561478b9434a2766 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Sat, 1 Jan 2011 17:54:23 +0000 Subject: Forward port: Don't grab the focus if the view did not have the focus already. CCBUG: 261147 FIXED-IN: 4.6.0 svn path=/trunk/KDE/kdebase/apps/; revision=1210659 --- src/views/dolphinview.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/views/dolphinview.cpp') diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index 1e97d6864..b02f794b3 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -1231,12 +1231,14 @@ void DolphinView::deleteView() if (view != 0) { disconnectViewAccessor(); - // It's important to set the keyboard focus to the parent - // before deleting the view: Otherwise when having a split - // view the other view will get the focus and will request - // an activation (see DolphinView::eventFilter()). - setFocusProxy(0); - setFocus(); + if (hasFocus()) { + // It's important to set the keyboard focus to the parent + // before deleting the view: Otherwise when having a split + // view the other view will get the focus and will request + // an activation (see DolphinView::eventFilter()). + setFocusProxy(0); + setFocus(); + } m_viewModeController->disconnect(view); -- cgit v1.3