diff options
author | Zeno Albisser <zeno.albisser@digia.com> | 2013-05-23 20:04:39 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2013-05-31 10:55:53 +0200 |
commit | 2b8371ef007cfa2c580921ccfb896cb1e594814e (patch) | |
tree | 5d6cbfbb7c33d291ece1afc8e03e8549c92c01f8 /lib/render_widget_host_view_qt.cpp | |
parent | 534c1b9e6c4204cd4fbccb77d1f26db124410ca4 (diff) |
make the backingstore use a QPixmap instead of QBackingStore
Diffstat (limited to 'lib/render_widget_host_view_qt.cpp')
-rw-r--r-- | lib/render_widget_host_view_qt.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/lib/render_widget_host_view_qt.cpp b/lib/render_widget_host_view_qt.cpp index 864e847d2..6d5254daf 100644 --- a/lib/render_widget_host_view_qt.cpp +++ b/lib/render_widget_host_view_qt.cpp @@ -153,7 +153,7 @@ gfx::NativeView RenderWidgetHostViewQt::GetNativeView() const return gfx::NativeView(); } -QWindow* RenderWidgetHostViewQt::GetNativeViewQt() const OVERRIDE +RasterWindow* RenderWidgetHostViewQt::GetNativeViewQt() const { return m_view; } @@ -173,12 +173,12 @@ gfx::NativeViewAccessible RenderWidgetHostViewQt::GetNativeViewAccessible() // Set focus to the associated View component. void RenderWidgetHostViewQt::Focus() { - m_view->requestActivate(); + m_view->setFocus(Qt::MouseFocusReason); } bool RenderWidgetHostViewQt::HasFocus() const { - return m_view->isActive(); + return m_view->hasFocus(); } bool RenderWidgetHostViewQt::IsSurfaceAvailableForCopy() const @@ -400,7 +400,10 @@ bool RenderWidgetHostViewQt::HasAcceleratedSurface(const gfx::Size&) void RenderWidgetHostViewQt::GetScreenInfo(WebKit::WebScreenInfo* results) { - GetScreenInfoFromNativeWindow(m_view, results); + QWindow* window = m_view->window()->windowHandle(); + if (!window) + return; + GetScreenInfoFromNativeWindow(window, results); } gfx::Rect RenderWidgetHostViewQt::GetBoundsInRootWindow() @@ -428,8 +431,12 @@ void RenderWidgetHostViewQt::Paint(const gfx::Rect& scroll_rect) { bool force_create = !m_host->empty(); BackingStoreQt* backing_store = static_cast<BackingStoreQt*>(m_host->GetBackingStore(force_create)); - if (backing_store && m_view) - backing_store->displayBuffer(m_view); + if (backing_store && m_view) { + QSize s = m_view->size(); + QRect rect(0, 0, s.width(), s.height()); + m_view->setBackingStore(backing_store); + m_view->update(); + } } bool RenderWidgetHostViewQt::IsPopup() const |