From bb73ed639669874f21aa543bf15e9394f1a8c0b8 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Tue, 23 Oct 2012 18:45:16 +0200 Subject: Fix focus handling on views --- src/webwindow/webwindow.cpp | 8 ++++++++ src/webwindow/webwindow.h | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'src/webwindow') 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(); -- cgit v1.2.1