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

[REG 4.8.2->5.3.2] Mouse events are not generated (or processed) when clicking on a widget while a popup is open if said widget or one of its siblings uses OpenGL

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.4.0
    • 5.0.2, 5.1.1, 5.2.1, 5.3.1, 5.3.2
    • None
    • Compiled with Visual Studio 2010 and reproduced on three different machines with Windows 7 64 bits and differents graphics cards from Nvidia and AMD.
    • 6080db8c6d345cf4ad573215828246e86f9dc41b (qtbase/5.4, 28.10.2014, 5.4)

    Description

      Look at the attached example. Three top level widgets are created.

      1. The first one is a regular widget with a mouse press event handler. If you click on it a menu is shown. If you click again the menu is closed and shown again at the new location. Works as expected.
      2. The second widget is a QGLWidget with the same event handler as the first widget and behaves in the same way. Works as expected too.
      3. The third widget contains two child widgets with one of each type. If you click on either child widget the menu is shown. But if you click again the menu is closed but not shown again because the event handler is not called. If you click on the top level widget (i.e. on the margin) it works as expected. If you remove the GLWidget it also works as expected on both the parent and child widgets.

      This works as expected on all cases with Qt 4.8.

      I can also provide some additional hints:

      • If you move the widget with the children to the top left corner of the screen, there is a region of the child widgets where you actually obtain the expected behaviour. It looks like it works inside the rectangle of the screen that would be occupied by the child widgets if they were positioned exactly at the top left corner. If you make the window bigger, the region where it works is also bigger.
      • When the menu is shown on the child GLWidget, the following warning is printed on the console (only if the menu is a child of GLWidget):

        void __thiscall QWindow::setTransientParent(class QWindow *) QWidgetWindow(0xd3a0f8, name = "QWidgetClassWindow") must be a top level window.

      • In Qt 5.0.2 this actually fails for all the cases. Maybe the solution for QTBUG-30707 fixed it partially?

      Attachments

        1. qtbug41869_diag.diff
          4 kB
        2. qtbug41869.zip
          2 kB
        3. TestContextMenuEvent.zip
          1 kB

        Issue Links

          For Gerrit Dashboard: QTBUG-41869
          # Subject Branch Project Status CR V

          Activity

            People

              kleint Friedemann Kleint
              marc.ruiz Marc Ruiz
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes