diff options
| author | Po Lu | 2022-03-31 18:52:01 +0800 |
|---|---|---|
| committer | Po Lu | 2022-03-31 18:52:01 +0800 |
| commit | ce1f7f2467a59924134a89f61debd5a0a59a73ea (patch) | |
| tree | a3b9e106cce4501c39c28c2ef9aac6f537c5c6e9 /src | |
| parent | c1792c51de30d161131753181db2cfdc3cd70eaf (diff) | |
| download | emacs-ce1f7f2467a59924134a89f61debd5a0a59a73ea.tar.gz emacs-ce1f7f2467a59924134a89f61debd5a0a59a73ea.zip | |
Minor fixes to treatment of `allow_current_frame'
* src/xterm.c (x_dnd_send_drop): Don't send special event for
wrong frame.
(x_dnd_send_drop): Fix condition for returning
XdndActionPrivate.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xterm.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/xterm.c b/src/xterm.c index 6a19828a36a..81b84c8609c 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -2502,6 +2502,10 @@ x_dnd_send_drop (struct frame *f, Window target, Time timestamp, | |||
| 2502 | 2502 | ||
| 2503 | if (self_frame) | 2503 | if (self_frame) |
| 2504 | { | 2504 | { |
| 2505 | if (!x_dnd_allow_current_frame | ||
| 2506 | && self_frame == x_dnd_frame) | ||
| 2507 | return false; | ||
| 2508 | |||
| 2505 | /* Send a special drag-and-drop event when dropping on top of an | 2509 | /* Send a special drag-and-drop event when dropping on top of an |
| 2506 | Emacs frame to avoid all the overhead involved with sending | 2510 | Emacs frame to avoid all the overhead involved with sending |
| 2507 | client events. */ | 2511 | client events. */ |
| @@ -8625,7 +8629,7 @@ x_dnd_begin_drag_and_drop (struct frame *f, Time time, Atom xaction, | |||
| 8625 | if (x_dnd_end_window != None | 8629 | if (x_dnd_end_window != None |
| 8626 | && (any = x_any_window_to_frame (FRAME_DISPLAY_INFO (f), | 8630 | && (any = x_any_window_to_frame (FRAME_DISPLAY_INFO (f), |
| 8627 | x_dnd_end_window)) | 8631 | x_dnd_end_window)) |
| 8628 | && (any != f)) | 8632 | && (allow_current_frame || any != f)) |
| 8629 | return QXdndActionPrivate; | 8633 | return QXdndActionPrivate; |
| 8630 | 8634 | ||
| 8631 | if (x_dnd_action != None) | 8635 | if (x_dnd_action != None) |