Fix findMenu y_ret: subtract top_width for content-relative coords

findMenu was returning y relative to the frame top (including titlebar).
getEntryAt expects y relative to the content area. Subtracting top_width
means pointer in titlebar gives y<0 → entry_no=-1 (no selection), which
is correct behavior matching the X11 path.
This commit is contained in:
Levi Neely 2026-05-13 17:48:08 +02:00
parent 784fcfbfb2
commit bfa248ae29
1 changed files with 1 additions and 1 deletions

View File

@ -1123,7 +1123,7 @@ static WMenu *findMenu(WScreen * scr, int *x_ret, int *y_ret)
x >= (m)->frame_x && x < (m)->frame_x + MENUW(m) && \
y >= (m)->frame_y && y < (m)->frame_y + MENUH(m)) { \
*x_ret = x - (m)->frame_x; \
*y_ret = y - (m)->frame_y; \
*y_ret = y - (m)->frame_y - (m)->frame->top_width; \
return (m); \
} \
} while(0)