interactions: fix popouts close on lose hover

This commit is contained in:
2 * r + 2 * t 2025-08-23 23:20:37 +10:00
parent f662717c0a
commit 760f7c2001

View file

@ -31,6 +31,10 @@ CustomMouseArea {
return x >= panelX - Config.border.rounding && x <= panelX + panel.width + Config.border.rounding; return x >= panelX - Config.border.rounding && x <= panelX + panel.width + Config.border.rounding;
} }
function inLeftPanel(panel: Item, x: real, y: real): bool {
return x < bar.implicitWidth + panel.x + panel.width && withinPanelHeight(panel, x, y);
}
function inRightPanel(panel: Item, x: real, y: real): bool { function inRightPanel(panel: Item, x: real, y: real): bool {
return x > bar.implicitWidth + panel.x && withinPanelHeight(panel, x, y); return x > bar.implicitWidth + panel.x && withinPanelHeight(panel, x, y);
} }
@ -160,6 +164,8 @@ CustomMouseArea {
// Show popouts on hover // Show popouts on hover
if (x < bar.implicitWidth) if (x < bar.implicitWidth)
bar.checkPopout(y); bar.checkPopout(y);
else if (!popouts.currentName.startsWith("traymenu") && !inLeftPanel(panels.popouts, x, y))
popouts.hasCurrent = false;
} }
// Monitor individual visibility changes // Monitor individual visibility changes