From 3b4d243c170ba45fdd1fc07cc24f3554c9e70857 Mon Sep 17 00:00:00 2001 From: Andrea Diamantini Date: Wed, 1 Sep 2010 00:47:33 +0200 Subject: Let urlbar being usable also in fullscreen mode BUG: 243900 --- src/application.cpp | 7 +++---- src/mainwindow.cpp | 4 ++++ src/webview.cpp | 9 ++++++--- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/application.cpp b/src/application.cpp index d66e290f..5e7cbd57 100644 --- a/src/application.cpp +++ b/src/application.cpp @@ -228,7 +228,6 @@ int Application::newInstance() } } - if(isFirstLoad) { // give me some time to do the other things.. @@ -439,13 +438,13 @@ void Application::loadResolvedUrl(ThreadWeaver::Job *job) KUrl url = threadedJob->url(); WebView *view = threadedJob->view(); - // Bye and thanks :) - delete threadedJob; - if (view) { view->load(url); } + + // Bye and thanks :) + delete threadedJob; } diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 5bacb699..11580f69 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -600,6 +600,10 @@ void MainWindow::setupPanels() void MainWindow::openLocation() { + if(isFullScreen()) + { + setWidgetsVisible(true); + } m_view->urlBar()->selectAll(); m_view->urlBar()->setFocus(); } diff --git a/src/webview.cpp b/src/webview.cpp index 2c800036..b794007f 100644 --- a/src/webview.cpp +++ b/src/webview.cpp @@ -40,6 +40,7 @@ #include "searchengine.h" #include "websnap.h" #include "iconmanager.h" +#include "urlbar.h" // KDE Includes #include @@ -407,15 +408,17 @@ void WebView::mouseMoveEvent(QMouseEvent *event) return; } - if (Application::instance()->mainWindow()->isFullScreen()) + MainWindow *w = Application::instance()->mainWindow(); + if (w->isFullScreen()) { if (event->pos().y() >= 0 && event->pos().y() <= 4) { - Application::instance()->mainWindow()->setWidgetsVisible(true); + w->setWidgetsVisible(true); } else { - Application::instance()->mainWindow()->setWidgetsVisible(false); + if(!w->mainView()->urlBar()->hasFocus()) + w->setWidgetsVisible(false); } } KWebView::mouseMoveEvent(event); -- cgit v1.2.1