From 0ac4019528888aba8528432434300341df732c4e Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Tue, 14 Oct 2014 16:55:17 +0200 Subject: [PATCH 1/4] Allow panels outside of availableGeometry MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 (cherry picked from commit 47ec22a50975d6f616043fc12424ae1e12e584bd) --- src/plugins/platforms/xcb/qxcbwindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp index 586068d8d9ed9c1987e51d664f76d4f33769f293..a99a5cfab51861b2c64ad552709f5d0bd39a62f3 100644 --- a/src/plugins/platforms/xcb/qxcbwindow.cpp +++ b/src/plugins/platforms/xcb/qxcbwindow.cpp @@ -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(screen); QWindowSystemInterface::handleWindowScreenChanged(window(), m_screen->QPlatformScreen::screen()); break; -- 2.1.2