aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/xterm.c28
1 files changed, 19 insertions, 9 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 455d5b795e9..1af0f41937d 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -20050,19 +20050,29 @@ handle_one_xevent (struct x_display_info *dpyinfo,
20050 { 20050 {
20051 f = mouse_or_wdesc_frame (dpyinfo, xev->event); 20051 f = mouse_or_wdesc_frame (dpyinfo, xev->event);
20052 20052
20053 if (xev->evtype == XI_ButtonPress) 20053 /* Don't track grab status for emulated pointer
20054 events, because they are ignored by the regular
20055 mouse click processing code. */
20056#ifdef XIPointerEmulated
20057 if (!(xev->flags & XIPointerEmulated))
20054 { 20058 {
20055 dpyinfo->grabbed |= (1 << xev->detail); 20059#endif
20056 dpyinfo->last_mouse_frame = f; 20060 if (xev->evtype == XI_ButtonPress)
20057 if (f && !tab_bar_p) 20061 {
20058 f->last_tab_bar_item = -1; 20062 dpyinfo->grabbed |= (1 << xev->detail);
20063 dpyinfo->last_mouse_frame = f;
20064 if (f && !tab_bar_p)
20065 f->last_tab_bar_item = -1;
20059#if ! defined (USE_GTK) 20066#if ! defined (USE_GTK)
20060 if (f && !tool_bar_p) 20067 if (f && !tool_bar_p)
20061 f->last_tool_bar_item = -1; 20068 f->last_tool_bar_item = -1;
20062#endif /* not USE_GTK */ 20069#endif /* not USE_GTK */
20070 }
20071 else
20072 dpyinfo->grabbed &= ~(1 << xev->detail);
20073#ifdef XIPointerEmulated
20063 } 20074 }
20064 else 20075#endif
20065 dpyinfo->grabbed &= ~(1 << xev->detail);
20066 20076
20067 if (xev->evtype == XI_ButtonPress 20077 if (xev->evtype == XI_ButtonPress
20068 && x_dnd_last_seen_window != None 20078 && x_dnd_last_seen_window != None