Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-63938

popup windows created by a WebEngineView appear on the desktop even if you're rendering to an offscreen surface

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • None
    • 5.9.2
    • WebEngine
    • None
    • Windows 10, Visual Studio 2017, rendering QML to an offscreen surface using OpenGL 4.5

    Description

      When rendering QML containing a WebEngineView to an offscreen surface via QQuickRenderControl, if you have a simple page containing a select tag ([like this one|https://hifi-content.s3.amazonaws.com/liv/dev/demo/demo.html)] and you click on the select tag, the popup window created appears on the desktop.  

      This means that if you're rendering offscreen for presentation in a 3D scene (for instance, for VR HMD UI, or for a Qt 3D scene) popup doesn't appear at all in the offscreen surface and may not actually be visible to the user (if they're using an HMD).  Even if you're rendering the offscreen content to a 2D surface, since the window used for rendering has no real desktop coordinates, the popup can appear completely in the wrong place, as seen in the screenshot.  

      The core issue seems to be in `QQuickWebEngineViewPrivate::CreateRenderWidgetHostViewQtDelegateForPopup` which queries the platform integration for the ability to create multiple windows in order to determine whether the new popup should be a top level window or not.  

       

      Ideally a WebEngineView should have some context information that it could use to determine whether it was rendering to a real window or an offscreen surface, and should add a test for that to set `hasWindowCapability` to false if the latter.  

      Attachments

        1. image-2017-10-20-10-35-58-557.png
          759 kB
          Bradley Austin Davis
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt_webengine_team Qt WebEngine Team
            jherico Bradley Austin Davis
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes