incorrect screen number reported by QDesktopWidget

Bug #1671853 reported by Alexander Bürger MET Norway
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
qtbase-opensource-src (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Hi,

we have a problem with combobox popups showing up on the wron screen. The system setup is: two displays à 1920x1200, one desktop, unity, xenial. On this system, the problem can be reproduced by running the stylesheet example from qtbase5-examples:

start /usr/lib/x86_64-linux-gnu/qt5/examples/widgets/widgets/stylesheet/stylesheet
move the main window to screen 2
click "edit style..." in the menu to open the style editor
move the style editor to screen 1
click on the combo box
the popup shows on the very left of screen 2, even if the combobox is on screen 1

Actually the popup seems to always show up on the screen with the mainwindow.

The problem seems to be that the patch debian/patches/multiscreen.diff does not work in this situation, it makes QApplication::desktop()->screenNumber(..combobox..) return the wrong screen. As far as I can tell, both the code for QDesktopWidget::screenNumber(const QWidget*) from the 5.5 and dev branches in Qt return the correct screen number in our situation.

We would appreciate if debian/patches/multiscreen.diff could be updated.

Best regards,

Alexander

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in qtbase-opensource-src (Ubuntu):
status: New → Confirmed
Revision history for this message
Alexander Bürger MET Norway (alexander-buerger-met-no) wrote :

"Backporting" the QDesktopWidget::screenNumber(QWidget*) function from qtbase HEAD helped for this particular problem. Packages with an extra patch (debian/patches/multiscreen-MET.diff) are available on launchpad: ppa:met-norway/updates-met

While the main problem is solved, the popups are still placed completely on one screen even if the combobox spans two screens. This is maybe a rather unusual window placement. Solving this probably requires changes to QDesktopWidget (screen number from widget corner) and QComboBox (popup placement such that it may span adjacent screens while still being completely visible without gap) and maybe other popups (QMenu?).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.