diff options
author | Po Lu <luangruo@yahoo.com> | 2022-09-16 17:01:41 +0800 |
---|---|---|
committer | Po Lu <luangruo@yahoo.com> | 2022-09-16 17:01:41 +0800 |
commit | 4cb3b4e98a7c43de9e210c22f70e9ad323a4340e (patch) | |
tree | 55a7328246b7210a61791b400e489335bf9d583f /src/xterm.c | |
parent | 3c0dda2663e38635163f0fd6c19748c6eba1c3c8 (diff) | |
download | emacs-4cb3b4e98a7c43de9e210c22f70e9ad323a4340e.tar.gz emacs-4cb3b4e98a7c43de9e210c22f70e9ad323a4340e.tar.bz2 emacs-4cb3b4e98a7c43de9e210c22f70e9ad323a4340e.zip |
Fix wrong source window being generated for XDND leave events
* src/xterm.c (x_dnd_update_state, handle_one_xevent): Let
x_dnd_last_seen_toplevel remain at its old value until any
XdndLeave event was definitely sent.
Diffstat (limited to 'src/xterm.c')
-rw-r--r-- | src/xterm.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/xterm.c b/src/xterm.c index 4c3b8128175..8c41f14864a 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -17152,8 +17152,6 @@ x_dnd_update_state (struct x_display_info *dpyinfo, Time timestamp) x_dnd_waiting_for_finish = false; target = None; } - - x_dnd_last_seen_toplevel = toplevel; } if (target != x_dnd_last_seen_window) @@ -17184,6 +17182,7 @@ x_dnd_update_state (struct x_display_info *dpyinfo, Time timestamp) } x_dnd_action = None; + x_dnd_last_seen_toplevel = toplevel; x_dnd_last_seen_window = target; x_dnd_last_protocol_version = target_proto; x_dnd_last_motif_style = motif_style; @@ -17211,6 +17210,8 @@ x_dnd_update_state (struct x_display_info *dpyinfo, Time timestamp) target, &emsg); } } + else + x_dnd_last_seen_toplevel = toplevel; if (x_dnd_last_window_is_frame && target != None) x_dnd_note_self_position (dpyinfo, target, root_x, root_y); @@ -19679,8 +19680,6 @@ handle_one_xevent (struct x_display_info *dpyinfo, x_dnd_waiting_for_finish = false; target = None; } - - x_dnd_last_seen_toplevel = toplevel; } if (target != x_dnd_last_seen_window) @@ -19732,6 +19731,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, } x_dnd_action = None; + x_dnd_last_seen_toplevel = toplevel; x_dnd_last_seen_window = target; x_dnd_last_protocol_version = target_proto; x_dnd_last_motif_style = motif_style; @@ -19760,6 +19760,8 @@ handle_one_xevent (struct x_display_info *dpyinfo, target, &emsg); } } + else + x_dnd_last_seen_toplevel = toplevel; if (x_dnd_last_window_is_frame && target != None) x_dnd_note_self_position (dpyinfo, target, @@ -21550,8 +21552,6 @@ handle_one_xevent (struct x_display_info *dpyinfo, x_dnd_waiting_for_finish = false; target = None; } - - x_dnd_last_seen_toplevel = toplevel; } if (target != x_dnd_last_seen_window) @@ -21605,6 +21605,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, } x_dnd_action = None; + x_dnd_last_seen_toplevel = toplevel; x_dnd_last_seen_window = target; x_dnd_last_protocol_version = target_proto; x_dnd_last_motif_style = motif_style; @@ -21633,6 +21634,8 @@ handle_one_xevent (struct x_display_info *dpyinfo, target, &emsg); } } + else + x_dnd_last_seen_toplevel = toplevel; if (x_dnd_last_window_is_frame && target != None) x_dnd_note_self_position (dpyinfo, target, |