From 8784ebf3a9f94c64cd09149c4906a3f494a1251d Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 3 Feb 2016 18:11:10 +0200 Subject: [PATCH] Fix x-popup-menu on TTYs without a mouse * src/menu.c (Fx_popup_menu): Be sure to initialize 'x' and 'y' for the TTY case without a mouse. (Bug#22538) --- src/menu.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/menu.c b/src/menu.c index caae228a259..cbddef35754 100644 --- a/src/menu.c +++ b/src/menu.c @@ -1236,6 +1236,9 @@ no quit occurs and `x-popup-menu' returns nil. */) { /* Use the mouse's current position. */ struct frame *new_f = SELECTED_FRAME (); + + XSETFASTINT (x, 0); + XSETFASTINT (y, 0); #ifdef HAVE_X_WINDOWS if (FRAME_X_P (new_f)) { -- 2.39.2