summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2012-10-23 18:45:16 +0200
committerAndrea Diamantini <adjam7@gmail.com>2012-12-10 02:48:05 +0100
commitbb73ed639669874f21aa543bf15e9394f1a8c0b8 (patch)
treed410030fa073a59bbfde2fd4f31a4d02e08af6ef /src
parentRemoved some porting FIXME and re-enabled old features (diff)
downloadrekonq-bb73ed639669874f21aa543bf15e9394f1a8c0b8.tar.xz
Fix focus handling on views
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();