summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/tabwindow/tabwindow.cpp4
-rw-r--r--src/webwindow/webwindow.cpp8
-rw-r--r--src/webwindow/webwindow.h4
3 files changed, 15 insertions, 1 deletions
diff --git a/src/tabwindow/tabwindow.cpp b/src/tabwindow/tabwindow.cpp
index 5b295981..1fe069fd 100644
--- a/src/tabwindow/tabwindow.cpp
+++ b/src/tabwindow/tabwindow.cpp
@@ -234,6 +234,8 @@ void TabWindow::currentChanged(int newIndex)
(t.isEmpty())
? setWindowTitle(QL1S("rekonq"))
: setWindowTitle(t + QL1S(" - rekonq"));
+
+ tab->checkFocus();
}
@@ -351,6 +353,8 @@ void TabWindow::tabLoadFinished(bool ok)
{
setTabText(index, QString());
}
+
+ tab->checkFocus();
}
diff --git a/src/webwindow/webwindow.cpp b/src/webwindow/webwindow.cpp
index 60eba237..188b4eed 100644
--- a/src/webwindow/webwindow.cpp
+++ b/src/webwindow/webwindow.cpp
@@ -895,3 +895,11 @@ void WebWindow::openNewWindow()
rApp->loadUrl(QUrl("about:home"), Rekonq::NewWindow);
}
+
+void WebWindow::checkFocus()
+{
+ if (url().scheme() == QL1S("about"))
+ _bar->setFocus();
+ else
+ _tab->view()->setFocus();
+}
diff --git a/src/webwindow/webwindow.h b/src/webwindow/webwindow.h
index 39643714..2a729a1a 100644
--- a/src/webwindow/webwindow.h
+++ b/src/webwindow/webwindow.h
@@ -83,7 +83,9 @@ public:
QAction *actionByName(const QString &name);
bool isPrivateBrowsing();
-
+
+ void checkFocus();
+
private:
void setupActions();
void setupTools();