diff options
| author | Po Lu | 2022-12-14 21:30:29 +0800 |
|---|---|---|
| committer | Po Lu | 2022-12-14 21:31:28 +0800 |
| commit | 42c757913a4c6acc07f8904df7def6b720bb23b4 (patch) | |
| tree | 5ea2d0b570fb60b41bd7f22bf61de32b7fa89395 /src | |
| parent | 1568123196cd8b57ed64e284b7deb058026be713 (diff) | |
| download | emacs-42c757913a4c6acc07f8904df7def6b720bb23b4.tar.gz emacs-42c757913a4c6acc07f8904df7def6b720bb23b4.zip | |
Work around primary selection clobbering during xterm DND
* src/xterm.c (x_dnd_do_unsupported_drop): Set `deactivate-mark'
to `dont-save'. Explain why.
(syms_of_xterm): New DEFSYM `dont-save'.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xterm.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/xterm.c b/src/xterm.c index 08dd41c64e1..968dec6fbdd 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -4040,6 +4040,12 @@ x_dnd_do_unsupported_drop (struct x_display_info *dpyinfo, | |||
| 4040 | if (owner != FRAME_X_WINDOW (f)) | 4040 | if (owner != FRAME_X_WINDOW (f)) |
| 4041 | return; | 4041 | return; |
| 4042 | 4042 | ||
| 4043 | /* mouse-drag-and-drop-region will immediately deactivate the mark | ||
| 4044 | after this is set. Make sure the primary selection is not | ||
| 4045 | clobbered in that case by setting `deactivate-mark' to | ||
| 4046 | Qdont_save. */ | ||
| 4047 | Vdeactivate_mark = Qdont_save; | ||
| 4048 | |||
| 4043 | event.xbutton.window = child; | 4049 | event.xbutton.window = child; |
| 4044 | event.xbutton.subwindow = None; | 4050 | event.xbutton.subwindow = None; |
| 4045 | event.xbutton.x = dest_x; | 4051 | event.xbutton.x = dest_x; |
| @@ -31538,6 +31544,8 @@ syms_of_xterm (void) | |||
| 31538 | DEFSYM (Qnow, "now"); | 31544 | DEFSYM (Qnow, "now"); |
| 31539 | DEFSYM (Qx_dnd_targets_list, "x-dnd-targets-list"); | 31545 | DEFSYM (Qx_dnd_targets_list, "x-dnd-targets-list"); |
| 31540 | DEFSYM (Qx_auto_preserve_selections, "x-auto-preserve-selections"); | 31546 | DEFSYM (Qx_auto_preserve_selections, "x-auto-preserve-selections"); |
| 31547 | DEFSYM (Qexpose, "expose"); | ||
| 31548 | DEFSYM (Qdont_save, "dont-save"); | ||
| 31541 | 31549 | ||
| 31542 | #ifdef USE_GTK | 31550 | #ifdef USE_GTK |
| 31543 | xg_default_icon_file = build_pure_c_string ("icons/hicolor/scalable/apps/emacs.svg"); | 31551 | xg_default_icon_file = build_pure_c_string ("icons/hicolor/scalable/apps/emacs.svg"); |
| @@ -31707,7 +31715,6 @@ always uses gtk_window_move and ignores the value of this variable. */); | |||
| 31707 | This option is only effective when Emacs is built with XInput 2 | 31715 | This option is only effective when Emacs is built with XInput 2 |
| 31708 | support. */); | 31716 | support. */); |
| 31709 | Vx_scroll_event_delta_factor = make_float (1.0); | 31717 | Vx_scroll_event_delta_factor = make_float (1.0); |
| 31710 | DEFSYM (Qexpose, "expose"); | ||
| 31711 | 31718 | ||
| 31712 | DEFVAR_BOOL ("x-gtk-use-native-input", x_gtk_use_native_input, | 31719 | DEFVAR_BOOL ("x-gtk-use-native-input", x_gtk_use_native_input, |
| 31713 | doc: /* Non-nil means to use GTK for input method support. | 31720 | doc: /* Non-nil means to use GTK for input method support. |