Details
-
Bug
-
Resolution: Done
-
P2: Important
-
None
-
5.3.1
-
None
-
Arch Linux with 3.1 kernel, Qt 5.3.1, XCB backend, XRandR 3.1
Description
I know similar issue has been reported in #32567 and it's marked as fixed for 5.2, but this does not work for X11.
(Reference: https://bugreports.qt-project.org/browse/QTBUG-32567)
The bug still exists in Qt 5.3 when the XCB backend is in use.
When the work area is changed (_NET_WORKAREA root property), my program never got "workAreaResized()" signal from QDesktopWidget.
When the screen size is changed or a new screen is added, the signal works, though. This used to work in Qt 4.8 so it's a regression bug of Qt 5.
Some more detailed info:
The only place where Qt emits the workAreaResized() signal is in the _q_updateScreens() method of QDesktopWidget.
However, _q_updateScreens() is only called on these conditions.
1. screenAdded() of qApp
2. geometryChanged() of screen
3. destroyed() of screen
4. in the constructor of QDesktopWidget
That's all.
The method _q_updateScreens() should be called as well in QXcbWindow::handlePropertyNotifyEvent().
Please see the code here:
else if (event->atom == atom(QXcbAtom::_NET_WORKAREA) && event->window == m_screen->root()) {
m_screen->updateGeometry(event->time);
}
The current code only update the geometry of work area but never trigger the emission of workAreaResized() signal.
This is a bug of the xcb qpa plugin. Though you already fixed the code in qpa iteself, there is another problem in the xcb plugin.
This bug still exists in 5.3.1.
Thank you very much.