aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPo Lu2022-07-26 10:29:16 +0800
committerPo Lu2022-07-26 10:29:16 +0800
commit06cec5ee0bd2c2a8fbc761bd5eb0254a4ecf10f4 (patch)
tree6050263c5b1235279a1e8837145db140e2da94ec
parentd04701c0c4959d3c42587a4e1277bb517a2ea04b (diff)
downloademacs-06cec5ee0bd2c2a8fbc761bd5eb0254a4ecf10f4.tar.gz
emacs-06cec5ee0bd2c2a8fbc761bd5eb0254a4ecf10f4.zip
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.
-rw-r--r--src/xterm.c9
1 files 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,
19062 19062
19063 dpyinfo->grabbed |= (1 << event->xbutton.button); 19063 dpyinfo->grabbed |= (1 << event->xbutton.button);
19064 dpyinfo->last_mouse_frame = f; 19064 dpyinfo->last_mouse_frame = f;
19065 if (f && !tab_bar_p) 19065
19066 if (f)
19066 f->last_tab_bar_item = -1; 19067 f->last_tab_bar_item = -1;
19067#if ! defined (USE_GTK) 19068#if ! defined (USE_GTK)
19068 if (f && !tool_bar_p) 19069 if (f)
19069 f->last_tool_bar_item = -1; 19070 f->last_tool_bar_item = -1;
19070#endif /* not USE_GTK */ 19071#endif /* not USE_GTK */
19071 } 19072 }
@@ -20479,10 +20480,10 @@ handle_one_xevent (struct x_display_info *dpyinfo,
20479 if (device) 20480 if (device)
20480 device->grab |= (1 << xev->detail); 20481 device->grab |= (1 << xev->detail);
20481 20482
20482 if (f && !tab_bar_p) 20483 if (f)
20483 f->last_tab_bar_item = -1; 20484 f->last_tab_bar_item = -1;
20484#if ! defined (USE_GTK) 20485#if ! defined (USE_GTK)
20485 if (f && !tool_bar_p) 20486 if (f)
20486 f->last_tool_bar_item = -1; 20487 f->last_tool_bar_item = -1;
20487#endif /* not USE_GTK */ 20488#endif /* not USE_GTK */
20488 } 20489 }