]> git.eshelyaron.com Git - emacs.git/commitdiff
Create a variable to enable selection on multi display
authorYuuki Harano <masm+github@masm11.me>
Fri, 14 May 2021 16:24:50 +0000 (01:24 +0900)
committerYuuki Harano <masm+github@masm11.me>
Fri, 14 May 2021 16:24:50 +0000 (01:24 +0900)
* src/pgtkselect.c (pgtk_selection_usable): If it is true, always
returns true.
(syms_of_pgtkselect): New bool variable.

src/pgtkselect.c

index 7b7bc69df75cbab83c26f5e602d12cc2d431aed1..8ab74744f398ce04c8354c4f380b50441e8f27ad 100644 (file)
@@ -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;
 }