From 06cec5ee0bd2c2a8fbc761bd5eb0254a4ecf10f4 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Tue, 26 Jul 2022 10:29:16 +0800 Subject: [PATCH] Remove some redundant checks in the DND code * src/xterm.c (handle_one_xevent): Don't check tab_bar_p or tool_bar_p before clearing last items during drag-and-drop. --- src/xterm.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/xterm.c b/src/xterm.c index e953f54d6da..6f8291b494b 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -19062,10 +19062,11 @@ handle_one_xevent (struct x_display_info *dpyinfo, dpyinfo->grabbed |= (1 << event->xbutton.button); dpyinfo->last_mouse_frame = f; - if (f && !tab_bar_p) + + if (f) f->last_tab_bar_item = -1; #if ! defined (USE_GTK) - if (f && !tool_bar_p) + if (f) f->last_tool_bar_item = -1; #endif /* not USE_GTK */ } @@ -20479,10 +20480,10 @@ handle_one_xevent (struct x_display_info *dpyinfo, if (device) device->grab |= (1 << xev->detail); - if (f && !tab_bar_p) + if (f) f->last_tab_bar_item = -1; #if ! defined (USE_GTK) - if (f && !tool_bar_p) + if (f) f->last_tool_bar_item = -1; #endif /* not USE_GTK */ } -- 2.39.2