Allow panels outside of availableGeometry

Panels windows are usually outside QScreen::availableGeometry, because
they will usually set extended struts to reserve the screen area for
themselves, but their own screen() must remain the one in which they
are.
This cause one downstream behavior to KDE
https://bugs.kde.org/show_bug.cgi?id=339846
in which a panel got by mistake few pixels on another screen, and
was immediately reassigned to that screen, because its geometry was
intersecting the new screen availableGeometry() but not the geometry
of its own screen, because itself reserved its own geometry away
from availableGeometry()

Change-Id: If6c9defdef62732473687dd336dbcec582bd0ea2
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
This commit is contained in:
Marco Martin 2014-10-14 16:55:17 +02:00 committed by Oswald Buddenhagen
parent a3cb057c3d
commit 47ec22a509

View File

@ -1687,9 +1687,9 @@ void QXcbWindow::handleConfigureNotifyEvent(const xcb_configure_notify_event_t *
QPlatformWindow::setGeometry(rect);
QWindowSystemInterface::handleGeometryChange(window(), rect);
if (!m_screen->availableGeometry().intersects(rect)) {
if (!m_screen->geometry().intersects(rect)) {
Q_FOREACH (QPlatformScreen* screen, m_screen->virtualSiblings()) {
if (screen->availableGeometry().intersects(rect)) {
if (screen->geometry().intersects(rect)) {
m_screen = static_cast<QXcbScreen*>(screen);
QWindowSystemInterface::handleWindowScreenChanged(window(), m_screen->QPlatformScreen::screen());
break;