From 0622df36112e41074dfff432c782e3e3b5de3e47 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Fri, 8 Apr 2022 07:47:10 +0800 Subject: [PATCH] * src/xterm.c (handle_one_xevent): Fix build warning on non-GTK builds. --- src/xterm.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/xterm.c b/src/xterm.c index d4a5e0ab3dc..8c6068e6541 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -16000,8 +16000,8 @@ handle_one_xevent (struct x_display_info *dpyinfo, case XI_Leave: { XILeaveEvent *leave = (XILeaveEvent *) xi_event; - struct xi_device_t *source; #ifdef USE_GTK + struct xi_device_t *source; XMotionEvent ev; ev.x = lrint (leave->event_x); @@ -16011,7 +16011,10 @@ handle_one_xevent (struct x_display_info *dpyinfo, #endif any = x_top_window_to_frame (dpyinfo, leave->event); + +#ifdef USE_GTK source = xi_device_from_id (dpyinfo, leave->sourceid); +#endif /* This allows us to catch LeaveNotify events generated by popup menu grabs. FIXME: this is right when there is a -- 2.39.5