diff options
| author | Po Lu | 2022-04-04 13:17:18 +0800 |
|---|---|---|
| committer | Po Lu | 2022-04-04 13:17:18 +0800 |
| commit | 4431cf604736b095aa86fd24da82930c3fc5ce19 (patch) | |
| tree | 48b5d794be3c58612e363f5bf0297b8eb5a9d6b1 /src | |
| parent | aea799838b7ffd11f187c2511ecca250c8b99411 (diff) | |
| download | emacs-4431cf604736b095aa86fd24da82930c3fc5ce19.tar.gz emacs-4431cf604736b095aa86fd24da82930c3fc5ce19.zip | |
Don't baselessly ignore frames after passing through the root window
* src/xterm.c (x_dnd_begin_drag_and_drop):
(handle_one_xevent): Don't rely on target not being None to set
x_dnd_return_frame to 2.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xterm.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/xterm.c b/src/xterm.c index c70b31c5ad1..969be23c7a2 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -9072,11 +9072,11 @@ x_dnd_begin_drag_and_drop (struct frame *f, Time time, Atom xaction, | |||
| 9072 | | SubstructureNotifyMask | 9072 | | SubstructureNotifyMask |
| 9073 | | PropertyChangeMask); | 9073 | | PropertyChangeMask); |
| 9074 | 9074 | ||
| 9075 | if (EQ (return_frame, Qnow)) | ||
| 9076 | x_dnd_update_state (FRAME_DISPLAY_INFO (f), CurrentTime); | ||
| 9077 | |||
| 9075 | while (x_dnd_in_progress || x_dnd_waiting_for_finish) | 9078 | while (x_dnd_in_progress || x_dnd_waiting_for_finish) |
| 9076 | { | 9079 | { |
| 9077 | if (EQ (return_frame, Qnow)) | ||
| 9078 | x_dnd_update_state (FRAME_DISPLAY_INFO (f), CurrentTime); | ||
| 9079 | |||
| 9080 | hold_quit.kind = NO_EVENT; | 9080 | hold_quit.kind = NO_EVENT; |
| 9081 | #ifdef USE_GTK | 9081 | #ifdef USE_GTK |
| 9082 | current_finish = X_EVENT_NORMAL; | 9082 | current_finish = X_EVENT_NORMAL; |
| @@ -12835,6 +12835,10 @@ x_dnd_update_state (struct x_display_info *dpyinfo, Time timestamp) | |||
| 12835 | 12835 | ||
| 12836 | if (target != x_dnd_last_seen_window) | 12836 | if (target != x_dnd_last_seen_window) |
| 12837 | { | 12837 | { |
| 12838 | if (target != FRAME_OUTER_WINDOW (x_dnd_frame) | ||
| 12839 | && x_dnd_return_frame == 1) | ||
| 12840 | x_dnd_return_frame = 2; | ||
| 12841 | |||
| 12838 | if (x_dnd_last_seen_window != None | 12842 | if (x_dnd_last_seen_window != None |
| 12839 | && x_dnd_last_protocol_version != -1 | 12843 | && x_dnd_last_protocol_version != -1 |
| 12840 | && x_dnd_last_seen_window != FRAME_OUTER_WINDOW (x_dnd_frame)) | 12844 | && x_dnd_last_seen_window != FRAME_OUTER_WINDOW (x_dnd_frame)) |
| @@ -12858,10 +12862,6 @@ x_dnd_update_state (struct x_display_info *dpyinfo, Time timestamp) | |||
| 12858 | x_dnd_last_seen_window, &lmsg); | 12862 | x_dnd_last_seen_window, &lmsg); |
| 12859 | } | 12863 | } |
| 12860 | 12864 | ||
| 12861 | if (target != FRAME_OUTER_WINDOW (x_dnd_frame) | ||
| 12862 | && x_dnd_return_frame == 1) | ||
| 12863 | x_dnd_return_frame = 2; | ||
| 12864 | |||
| 12865 | if (x_dnd_return_frame == 2 | 12865 | if (x_dnd_return_frame == 2 |
| 12866 | && x_any_window_to_frame (dpyinfo, target)) | 12866 | && x_any_window_to_frame (dpyinfo, target)) |
| 12867 | { | 12867 | { |
| @@ -14466,6 +14466,10 @@ handle_one_xevent (struct x_display_info *dpyinfo, | |||
| 14466 | 14466 | ||
| 14467 | if (target != x_dnd_last_seen_window) | 14467 | if (target != x_dnd_last_seen_window) |
| 14468 | { | 14468 | { |
| 14469 | if (target != FRAME_OUTER_WINDOW (x_dnd_frame) | ||
| 14470 | && x_dnd_return_frame == 1) | ||
| 14471 | x_dnd_return_frame = 2; | ||
| 14472 | |||
| 14469 | if (x_dnd_last_seen_window != None | 14473 | if (x_dnd_last_seen_window != None |
| 14470 | && x_dnd_last_protocol_version != -1 | 14474 | && x_dnd_last_protocol_version != -1 |
| 14471 | && x_dnd_last_seen_window != FRAME_OUTER_WINDOW (x_dnd_frame)) | 14475 | && x_dnd_last_seen_window != FRAME_OUTER_WINDOW (x_dnd_frame)) |
| @@ -14510,10 +14514,6 @@ handle_one_xevent (struct x_display_info *dpyinfo, | |||
| 14510 | } | 14514 | } |
| 14511 | } | 14515 | } |
| 14512 | 14516 | ||
| 14513 | if (target != FRAME_OUTER_WINDOW (x_dnd_frame) | ||
| 14514 | && x_dnd_return_frame == 1) | ||
| 14515 | x_dnd_return_frame = 2; | ||
| 14516 | |||
| 14517 | if (x_dnd_return_frame == 2 | 14517 | if (x_dnd_return_frame == 2 |
| 14518 | && x_any_window_to_frame (dpyinfo, target)) | 14518 | && x_any_window_to_frame (dpyinfo, target)) |
| 14519 | { | 14519 | { |
| @@ -15918,6 +15918,10 @@ handle_one_xevent (struct x_display_info *dpyinfo, | |||
| 15918 | 15918 | ||
| 15919 | if (target != x_dnd_last_seen_window) | 15919 | if (target != x_dnd_last_seen_window) |
| 15920 | { | 15920 | { |
| 15921 | if (target != FRAME_OUTER_WINDOW (x_dnd_frame) | ||
| 15922 | && x_dnd_return_frame == 1) | ||
| 15923 | x_dnd_return_frame = 2; | ||
| 15924 | |||
| 15921 | if (x_dnd_last_seen_window != None | 15925 | if (x_dnd_last_seen_window != None |
| 15922 | && x_dnd_last_protocol_version != -1 | 15926 | && x_dnd_last_protocol_version != -1 |
| 15923 | && x_dnd_last_seen_window != FRAME_OUTER_WINDOW (x_dnd_frame)) | 15927 | && x_dnd_last_seen_window != FRAME_OUTER_WINDOW (x_dnd_frame)) |
| @@ -15964,10 +15968,6 @@ handle_one_xevent (struct x_display_info *dpyinfo, | |||
| 15964 | } | 15968 | } |
| 15965 | } | 15969 | } |
| 15966 | 15970 | ||
| 15967 | if (target != FRAME_OUTER_WINDOW (x_dnd_frame) | ||
| 15968 | && x_dnd_return_frame == 1) | ||
| 15969 | x_dnd_return_frame = 2; | ||
| 15970 | |||
| 15971 | if (x_dnd_return_frame == 2 | 15971 | if (x_dnd_return_frame == 2 |
| 15972 | && x_any_window_to_frame (dpyinfo, target)) | 15972 | && x_any_window_to_frame (dpyinfo, target)) |
| 15973 | { | 15973 | { |