]> git.eshelyaron.com Git - emacs.git/commitdiff
Select window when clicking on an xwidget view
authorPo Lu <luangruo@yahoo.com>
Fri, 5 Nov 2021 09:46:47 +0000 (17:46 +0800)
committerLars Ingebrigtsen <larsi@gnus.org>
Sun, 7 Nov 2021 01:59:40 +0000 (02:59 +0100)
* src/xterm.c (handle_one_xevent): Select window when clicking on an
xwidget view.

src/xterm.c

index 9e0499ca0f2497283a99d4455f71fc765880e875..9b434bffcc2448a0ff49ffc4c49c11e8cf4fb705 100644 (file)
@@ -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