Priority: P2: Important
Affects Version/s: 5.5.1
Fix Version/s: None
Component/s: QPA: X11/XCB
Environment:openSUSE Tumbleweed, Plasma 5.5.3, Qt 5.5.1
ATI Radeon 7850
Given the following RandR setup:
- Screen 0 - 1680x1050, right of
- Screen 1 - 1280x1024,
QDesktopWidget::screenNumber always returns screen 1 during startup,
even if it is started on screen 0.
This behavior already existed with KDE 4, and it persists with Plasma 5.5.3 and Qt 5.5.1. The reason I noticed it is that the KDE feature to restore window sizes on startup seems to depend on that screenNumber call during application startup as well - and it does not work screen 0.
In the attached test program, the following method is called both in the main window constructor and manually through a button:
When I start the attached project in QtCreator on screen #0, the output looks like the following:
When I launch the program on screen #1, the output is as expected (screen 1 is returned from both calls).
I don't know if the Qt behavior is expected and the issue is with KDE (or KWin), or if this behaviour is indeed a bug that should be fixed.