summaryrefslogtreecommitdiffstats
path: root/src/gui/doc/snippets/brush
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2018-10-10 12:36:17 +0200
committerJohan Helsing <johan.helsing@qt.io>2018-10-15 07:44:04 +0000
commit02a214442781bf112c1cc85d2470c6fcec8ed207 (patch)
tree1150e6a4f1b9fee7d1c29860faeddf3edbde852f /src/gui/doc/snippets/brush
parentf2f040ae1c4fe48bff68bb45b2e20308fa895c50 (diff)
QToolTip: Don't crash if a tool tip is shown outside screen geometry
In some cases, a tool tip may be shown outside screen geometry, i.e. if: - QToolTip::showText is invoked manually with a position outside. - In tst_QToolTip::setPalette if there is no screen at (0, 0). This might happen in a multi-monitor setups where one screen is taller than the other. - On Wayland windows are (by design) not allowed to know their position on the screen. This means that global positions can't be trusted. This started crashing when QDesktopWidget::screenGeometry(pos) was replaced with QGuiApplication::screenAt(pos)->geometry() because screenAt will return null if no screen is found, while screenGeometry defaulted to the primary screen. This reverts to the old behavior of falling back to the primary screen. This won't solve the issue completely for the Wayland case, but at least we will stop crashing. Change-Id: I42dd07cc21c2f9f0ea0d69f0c25bd46d8a2615a0 Reviewed-by: Filipe Azevedo <filipe.azevedo@kdab.com> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src/gui/doc/snippets/brush')
0 files changed, 0 insertions, 0 deletions