From 33849a7fc3a948da2ddd6a96533e057583ef8e54 Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Tue, 31 Jul 2018 10:55:45 +0200 Subject: [PATCH] Qt: Fix tooltip position MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit commit 5815534 ("qt: make the time tooltip a tooltip") reintroduced the bug fixed by previous commit ea99237 ("remove X11BypassWindowManagerHint from time tooltip") meant to fix #17829. The tooltip window is a shaped, override-redirect window which shows when the pointer enters the slider and disappears when it leaves the slider. By placing the tooltip window too low, above the slider, vlc causes a constant map/unmap of that window which will flood Xwayland and the Wayland compositori.window manager and can up with a deadlock situation. When the tooltip window is showing, the pointer will enter the tooltip window and thus leave the slider, which will cause the tooltip to be unmapped, which in turn causes the pointer to re-enter the slider area, which will cause the tooltip to show again, so on and so forth. On Wayland/Xwayland where the Wayland compositor (i.e. the display server) is also the window manager, that can lead to a deadlock situation because some X11 requests are blocking on rountrips to the Xserver, which in the case of Xwayland is also a Wayland client, waiting on the Wayland compositor for some operations, the Wayland compositor being also a Window manager and an X11 client at the same time... Avoid the issue by placing the tooltip so that it does not show up at the same location where the slider is, without overlap, to avoid that map/unmap requests storm. Closes: https://gitlab.gnome.org/GNOME/mutter/issues/244 Signed-off-by: Olivier Fourdan Signed-off-by: Hugo Beauzée-Luyssen (cherry picked from commit 6579a36c56ed30b72de584bf0e8cf21af1a90cf7) Signed-off-by: Hugo Beauzée-Luyssen --- modules/gui/qt/util/timetooltip.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gui/qt/util/timetooltip.cpp b/modules/gui/qt/util/timetooltip.cpp index 1314b520ea..7a63a9d7d9 100644 --- a/modules/gui/qt/util/timetooltip.cpp +++ b/modules/gui/qt/util/timetooltip.cpp @@ -73,7 +73,7 @@ void TimeTooltip::adjustPosition() #if defined( Q_OS_WIN ) mTarget.y() - 2 * size.height() - TIP_HEIGHT / 2 ); #else - mTarget.y() - size.height() + TIP_HEIGHT / 2 ); + mTarget.y() - size.height() - TIP_HEIGHT / 2 ); #endif // Keep the tooltip on the same screen if possible -- 2.11.0