Commit d24ab7b5 authored by David Redondo's avatar David Redondo 🏎
Browse files

Hide tooltip window immediately before opening context menu

Tooltip internally uses TooltipDialog (a QWindow subclass)  which runs a timer
before it hides itself. This is done so it can be reused and to prevent flickering
when switching between Tooltips quickly. However here it causes an issue, when
closing a popup on Wayland, Qt closes all popups that were opened after it. This means
when openening a ContextMenu while a Tooltip is shown, the TooltipDialog will hide
itself *after* the window of the context menu has been created and close it in the
process.
As a workaround we can hide the window manually before creating the context menu.
CCBUG: 417939
FIXED-IN:5.22
parent a287a20e
......@@ -18,6 +18,7 @@
***************************************************************************/
import QtQuick 2.0
import QtQuick.Window 2.15
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.components 2.0 as PlasmaComponents
......@@ -242,6 +243,8 @@ MouseArea {
}
function showContextMenu(args) {
// Workaround for BUG 417939
toolTipArea.mainItem.Window.window.visible = false
contextMenu = tasks.createContextMenu(task, modelIndex(), args);
contextMenu.show();
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment