The press-to-release drag threshold armed on any movement past 8px,
even when the popup cannot scroll - so a touchpad click's natural
wobble flipped a click into a 'drag' and silently swallowed the
selection (the 'I press Dark and nothing happens' case on the theme
screen's fixed three-option mode popup).
Arm the drag state only when the list can actually scroll, and on
release still select when a drag never moved the list (wobble there
and back). Covered by two injected-input tests: the layout test now
runs wobbled clicks, slow hold-clicks and scroll-drags from a clean
slate per scenario, and a new theme-screen test drives the stacked
mode/palette/style dropdowns exactly like the settings screen,
including a wobbled Dark press through the two-phase settings API.
Open dropdown popups had no keyboard or focus dismissal - only the
mouse paths (option select, button toggle, outside click) closed them,
so any pointer-state weirdness could leave a popup feeling stuck.
Escape now closes every open popup, and losing the window focus closes
them all; both covered in the injected-tap layout test alongside
wheel-scroll + close checks (the wheel test also wheels the correct
raylib direction now).
dropdown_menu_layout sized a clamped popup from whichever side had more
room, but only honored opening upward when the caller passed the open_up
out-param - and no caller did. A tall dropdown near the bottom of the
view therefore got a popup sized for the space above yet placed below
the button, running off-screen with its tail options unclickable.
Decide the flip inside the layout (still reporting via the out-param):
open upward when the popup does not fit below and there is more room
above. Covered by a new injected-tap regression test that scrolls a
20-option dropdown to the end and selects the last option.