diff options
author | megabigbug <megabigbug@arrakis.(none)> | 2009-10-24 15:14:48 +0200 |
---|---|---|
committer | megabigbug <megabigbug@arrakis.(none)> | 2009-10-24 15:14:48 +0200 |
commit | 22da5e272be7d1d66c2fbe4048e8458f58e9ccbb (patch) | |
tree | da3eb346f22a9adbbfea336454bf668b565e097e /src/webview.cpp | |
parent | Merge commit 'refs/merge-requests/1895' of git://gitorious.org/rekonq/mainline (diff) | |
download | rekonq-22da5e272be7d1d66c2fbe4048e8458f58e9ccbb.tar.xz |
A better popup implementation
Diffstat (limited to 'src/webview.cpp')
-rw-r--r-- | src/webview.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/webview.cpp b/src/webview.cpp index 7efded7f..edd8d9f6 100644 --- a/src/webview.cpp +++ b/src/webview.cpp @@ -63,6 +63,7 @@ WebView::WebView(QWidget* parent) , m_scrollDirection(WebView::NoScroll) , m_scrollSpeedVertical(0) , m_scrollSpeedHorizontal(0) + , m_mousePos(QPoint(0,0)) { setPage(m_page); @@ -451,22 +452,19 @@ void WebView::mousePressEvent(QMouseEvent *event) void WebView::mouseMoveEvent(QMouseEvent *event) { - QPoint p = event->pos(); - QSize s = size(); - int x = s.width() / 2; - int y = s.height() - 30; // quite reasonable value, without performing requests, cause of speed + m_mousePos = event->pos(); - if(p.x() <= x && p.y() >= y ) - Application::instance()->mainWindow()->setFlickeringZone(true); - else - Application::instance()->mainWindow()->setFlickeringZone(false); - if( url().protocol() != "rekonq" ) { QWebView::mouseMoveEvent(event); } } +QPoint WebView::mousePos() +{ + return m_mousePos; +} + void WebView::wheelEvent(QWheelEvent *event) { |