From 3f8f3a9027a1de28899725f0fecdc4f1f33c1479 Mon Sep 17 00:00:00 2001 From: Yuuki Harano Date: Sat, 15 May 2021 01:24:50 +0900 Subject: [PATCH] Create a variable to enable selection on multi display * src/pgtkselect.c (pgtk_selection_usable): If it is true, always returns true. (syms_of_pgtkselect): New bool variable. --- src/pgtkselect.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/pgtkselect.c b/src/pgtkselect.c index 7b7bc69df75..8ab74744f39 100644 --- a/src/pgtkselect.c +++ b/src/pgtkselect.c @@ -235,6 +235,9 @@ pgtk_selection_lost (GtkWidget * widget, GdkEventSelection * event, static bool pgtk_selection_usable (void) { + if (pgtk_enable_selection_on_multi_display) + return true; + /* * https://github.com/GNOME/gtk/blob/gtk-3-24/gdk/wayland/gdkselection-wayland.c#L1033 * @@ -639,4 +642,9 @@ to convert into a type that we don't know about or that is inappropriate.\n\ This hook doesn't let you change the behavior of Emacs's selection replies,\n\ it merely informs you that they have happened."); Vpgtk_sent_selection_hooks = Qnil; + + DEFVAR_BOOL ("pgtk-enable-selection-on-multi-display", pgtk_enable_selection_on_multi_display, + doc: /* Enable selection on multi display environment. +This may cause crash. */); + pgtk_enable_selection_on_multi_display = false; } -- 2.39.5