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

Wrong context menu position when attaching external screen

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.15.3
    • WebEngine
    • None
    • Linux/X11

    Description

      I've seen many fixes over the years for context menus appearing at the wrong place with QtWebEngine, but I've still had issues with it - finally I think I have a reproducer.

      Consider a setup with a undocked/docked laptop. In an undocked configuration, it has an internal 1920x1080px screen. In the docked scenario, two 4K screens are added to the left of it:
       

      HDMI-A-0 connected 3840x2160+0+0 
      DisplayPort-4 connected 3840x2160+3840+0
      eDP connected primary 1920x1080+7680+0
      

      Or, since a "picture" says more than 1000 words:

      .----------------. .----------------. .--------.
      |                | |                | | 1920x  |
      |   3840 x 2160  | |   3840 x 2160  | | 1080   |
      |                | |                | '--------'
      |                | |                |
      '----------------' '----------------'
      

      With the following steps:

      • Undock laptop (so that only the internal screen is available)
      • Launch simplebrowser (tested 5.15.3 and the current 5.15 branch - older releases are likely affected as well, I didn't test Qt 6 yet)
      • Confirm the context menu is working normally
      • Dock laptop (so that the two new screens are available)

      The following happens:

      • As long as the window is on the leftmost screen, and I'm right-clicking inside the top-left quarter (i.e. the 1920x1080 part of it, where the internal screen conceptually "used to be" before), things work normally:
      .----------------. .----------------. .--------.
      |########        | |                | | 1920x  |
      |########        | |   3840 x 2160  | | 1080   |
      |                | |                | '--------'
      |                | |                |
      '----------------' '----------------'
      
      • When the window is on the leftmost screen but I'm right-clicking outside of the top-left corner, the context menu appears, but is at the wrong position (I believe the X/Y coordinates get capped to the former screen resolution, so when clicking at e.g. 3000/100, the menu would appear at 1920/100)
      • When the window is on the middle or the right (internal) screen, the menu doesn't seem to appear at all.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            allan.jensen Allan Sandfeld Jensen
            the compiler Florian Bruhin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes