diff options
| author | Po Lu | 2022-09-16 17:01:41 +0800 |
|---|---|---|
| committer | Po Lu | 2022-09-16 17:01:41 +0800 |
| commit | 4cb3b4e98a7c43de9e210c22f70e9ad323a4340e (patch) | |
| tree | 55a7328246b7210a61791b400e489335bf9d583f /src | |
| parent | 3c0dda2663e38635163f0fd6c19748c6eba1c3c8 (diff) | |
| download | emacs-4cb3b4e98a7c43de9e210c22f70e9ad323a4340e.tar.gz 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')
| -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) | |||
| 17152 | x_dnd_waiting_for_finish = false; | 17152 | x_dnd_waiting_for_finish = false; |
| 17153 | target = None; | 17153 | target = None; |
| 17154 | } | 17154 | } |
| 17155 | |||
| 17156 | x_dnd_last_seen_toplevel = toplevel; | ||
| 17157 | } | 17155 | } |
| 17158 | 17156 | ||
| 17159 | if (target != x_dnd_last_seen_window) | 17157 | if (target != x_dnd_last_seen_window) |
| @@ -17184,6 +17182,7 @@ x_dnd_update_state (struct x_display_info *dpyinfo, Time timestamp) | |||
| 17184 | } | 17182 | } |
| 17185 | 17183 | ||
| 17186 | x_dnd_action = None; | 17184 | x_dnd_action = None; |
| 17185 | x_dnd_last_seen_toplevel = toplevel; | ||
| 17187 | x_dnd_last_seen_window = target; | 17186 | x_dnd_last_seen_window = target; |
| 17188 | x_dnd_last_protocol_version = target_proto; | 17187 | x_dnd_last_protocol_version = target_proto; |
| 17189 | x_dnd_last_motif_style = motif_style; | 17188 | x_dnd_last_motif_style = motif_style; |
| @@ -17211,6 +17210,8 @@ x_dnd_update_state (struct x_display_info *dpyinfo, Time timestamp) | |||
| 17211 | target, &emsg); | 17210 | target, &emsg); |
| 17212 | } | 17211 | } |
| 17213 | } | 17212 | } |
| 17213 | else | ||
| 17214 | x_dnd_last_seen_toplevel = toplevel; | ||
| 17214 | 17215 | ||
| 17215 | if (x_dnd_last_window_is_frame && target != None) | 17216 | if (x_dnd_last_window_is_frame && target != None) |
| 17216 | x_dnd_note_self_position (dpyinfo, target, root_x, root_y); | 17217 | x_dnd_note_self_position (dpyinfo, target, root_x, root_y); |
| @@ -19679,8 +19680,6 @@ handle_one_xevent (struct x_display_info *dpyinfo, | |||
| 19679 | x_dnd_waiting_for_finish = false; | 19680 | x_dnd_waiting_for_finish = false; |
| 19680 | target = None; | 19681 | target = None; |
| 19681 | } | 19682 | } |
| 19682 | |||
| 19683 | x_dnd_last_seen_toplevel = toplevel; | ||
| 19684 | } | 19683 | } |
| 19685 | 19684 | ||
| 19686 | if (target != x_dnd_last_seen_window) | 19685 | if (target != x_dnd_last_seen_window) |
| @@ -19732,6 +19731,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, | |||
| 19732 | } | 19731 | } |
| 19733 | 19732 | ||
| 19734 | x_dnd_action = None; | 19733 | x_dnd_action = None; |
| 19734 | x_dnd_last_seen_toplevel = toplevel; | ||
| 19735 | x_dnd_last_seen_window = target; | 19735 | x_dnd_last_seen_window = target; |
| 19736 | x_dnd_last_protocol_version = target_proto; | 19736 | x_dnd_last_protocol_version = target_proto; |
| 19737 | x_dnd_last_motif_style = motif_style; | 19737 | x_dnd_last_motif_style = motif_style; |
| @@ -19760,6 +19760,8 @@ handle_one_xevent (struct x_display_info *dpyinfo, | |||
| 19760 | target, &emsg); | 19760 | target, &emsg); |
| 19761 | } | 19761 | } |
| 19762 | } | 19762 | } |
| 19763 | else | ||
| 19764 | x_dnd_last_seen_toplevel = toplevel; | ||
| 19763 | 19765 | ||
| 19764 | if (x_dnd_last_window_is_frame && target != None) | 19766 | if (x_dnd_last_window_is_frame && target != None) |
| 19765 | x_dnd_note_self_position (dpyinfo, target, | 19767 | x_dnd_note_self_position (dpyinfo, target, |
| @@ -21550,8 +21552,6 @@ handle_one_xevent (struct x_display_info *dpyinfo, | |||
| 21550 | x_dnd_waiting_for_finish = false; | 21552 | x_dnd_waiting_for_finish = false; |
| 21551 | target = None; | 21553 | target = None; |
| 21552 | } | 21554 | } |
| 21553 | |||
| 21554 | x_dnd_last_seen_toplevel = toplevel; | ||
| 21555 | } | 21555 | } |
| 21556 | 21556 | ||
| 21557 | if (target != x_dnd_last_seen_window) | 21557 | if (target != x_dnd_last_seen_window) |
| @@ -21605,6 +21605,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, | |||
| 21605 | } | 21605 | } |
| 21606 | 21606 | ||
| 21607 | x_dnd_action = None; | 21607 | x_dnd_action = None; |
| 21608 | x_dnd_last_seen_toplevel = toplevel; | ||
| 21608 | x_dnd_last_seen_window = target; | 21609 | x_dnd_last_seen_window = target; |
| 21609 | x_dnd_last_protocol_version = target_proto; | 21610 | x_dnd_last_protocol_version = target_proto; |
| 21610 | x_dnd_last_motif_style = motif_style; | 21611 | x_dnd_last_motif_style = motif_style; |
| @@ -21633,6 +21634,8 @@ handle_one_xevent (struct x_display_info *dpyinfo, | |||
| 21633 | target, &emsg); | 21634 | target, &emsg); |
| 21634 | } | 21635 | } |
| 21635 | } | 21636 | } |
| 21637 | else | ||
| 21638 | x_dnd_last_seen_toplevel = toplevel; | ||
| 21636 | 21639 | ||
| 21637 | if (x_dnd_last_window_is_frame && target != None) | 21640 | if (x_dnd_last_window_is_frame && target != None) |
| 21638 | x_dnd_note_self_position (dpyinfo, target, | 21641 | x_dnd_note_self_position (dpyinfo, target, |