Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-26053

With X11 and multiple monitors, the autocomplete list tooltip has zero width if Qt Creator is not on the leftmost monitor

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • Qt Creator 5.0.0-rc1
    • Qt Creator 4.15.2
    • Editors
    • None
    • More than one monitor horizontally
    • Linux/X11
    • 1a3b8bf0e7d6ff727f9dffacab2360d1c01b397e (qt-creator/qt-creator/5.0)

    Description

      I'm currently using two monitors next to each other under X11 (Linux). If I don't have Qt Creator on the leftmost monitor, the tooltip next to the autocomplete dropdown has basically no width:

      On the leftmost screen, the tooltip works as expected.

      This issue is caused by the fact that the monitor width that is used to calculate the width of the tooltip is QScreen::availableGeometry. As the docs state, "Note, on X11 this will return the true available geometry only on systems with one monitor and if window manager has set _NET_WORKAREA atom. In all other cases this is equal to geometry(). This is a limitation in X11 window manager specification."

      From my own testing, I noticed that switching the function call in generalproposalwidget.cpp to QScreen::virtualGeometry seems to fix the issue.

      Steps to reproduce:

      1. Have more than one monitor next to each other
      2. Put Qt Creator on the rightmost monitor
      3. Start writing code that Qt Creator autocompletes and observe how the tooltip has basically zero width.

      Attachments

        Activity

          People

            davschul David Schulz
            exploder Esko Toivonen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: