XQuartz: Improve type safety for X11Controller's application menu editor

Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
(cherry picked from commit 4cfdc5af)
3 jobs for server-1.20-branch in 4 minutes and 7 seconds (queued for 3 seconds)