From: Po Lu Date: Wed, 1 Nov 2023 03:15:24 +0000 (+0800) Subject: Prevent errors when generating events above menu bar windows X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a61cc138edeee269e8cf62c13058d5258310d7bc;p=emacs.git Prevent errors when generating events above menu bar windows * src/keyboard.c (make_lispy_position): Pass false to w_f_c, for the subsequent code is not prepared to encounter menu bar windows. --- diff --git a/src/keyboard.c b/src/keyboard.c index c00f48d7836..003340c3e58 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -5561,9 +5561,10 @@ make_lispy_position (struct frame *f, Lisp_Object x, Lisp_Object y, /* Coordinate pixel positions to return. */ int xret = 0, yret = 0; /* The window or frame under frame pixel coordinates (x,y) */ - Lisp_Object window_or_frame = f - ? window_from_coordinates (f, mx, my, &part, true, true, true) - : Qnil; + Lisp_Object window_or_frame = (f != NULL + ? window_from_coordinates (f, mx, my, &part, + false, true, true) + : Qnil); #ifdef HAVE_WINDOW_SYSTEM bool tool_bar_p = false; bool menu_bar_p = false;