Skip to content

Commit 9b43821

Browse files
committed
Add a workaround patch for PopupMenu subitem touch misses. (Codex)
In aap-juce-byod, there is an issue that those presets menu items (particularly the actual presets) cannot be "selected" by touches. It is most likely due to inconsistent coordinates caulculation, but it's already too complicated (even for Codex) to find the right fix. So, instead of the real fix, this patch first "ignores" item selection on the first subitem hit testing. That skips the rest of the if-elif-elif... conditions, so the popup does not dismiss. Then we can select a preset subitem with (somehow) *correct* hit testing and the preset selection works.
1 parent 08c03b2 commit 9b43821

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
diff --git a/modules/juce_gui_basics/menus/juce_PopupMenu.cpp b/modules/juce_gui_basics/menus/juce_PopupMenu.cpp
2+
--- a/modules/juce_gui_basics/menus/juce_PopupMenu.cpp
3+
+++ b/modules/juce_gui_basics/menus/juce_PopupMenu.cpp
4+
@@ -1438,6 +1438,10 @@ private:
5+
{
6+
if (reallyContained)
7+
window.triggerCurrentlyHighlightedItem();
8+
+#if JUCE_ANDROID
9+
+ else if (source.isTouch())
10+
+ {
11+
+ }
12+
+#endif
13+
else if ((window.hasBeenOver || ! window.dismissOnMouseUp) && ! isOverAny)
14+
window.dismissMenu (nullptr);
15+

0 commit comments

Comments
 (0)