From 49ed7066835462eb7395b68ca47c83da1ba3a024 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Fri, 5 Nov 2021 17:46:47 +0800 Subject: [PATCH] Select window when clicking on an xwidget view * src/xterm.c (handle_one_xevent): Select window when clicking on an xwidget view. --- src/xterm.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/xterm.c b/src/xterm.c index 9e0499ca0f2..9b434bffcc2 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -9289,6 +9289,12 @@ handle_one_xevent (struct x_display_info *dpyinfo, event->xbutton.x, event->xbutton.y, event->xbutton.button, event->xbutton.state, event->xbutton.time); + + if (!EQ (selected_window, xvw->w)) + { + inev.ie.kind = SELECT_WINDOW_EVENT; + inev.ie.frame_or_window = xvw->w; + } goto OTHER; } #endif -- 2.39.5