emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 05c4e7bfbd: Prevent SelectionNotify etc from reaching GTK 3


From: Po Lu
Subject: master 05c4e7bfbd: Prevent SelectionNotify etc from reaching GTK 3
Date: Thu, 11 Aug 2022 21:25:28 -0400 (EDT)

branch: master
commit 05c4e7bfbdc5c0ed462be7356e6841e1e59d3851
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Prevent SelectionNotify etc from reaching GTK 3
    
    * src/xterm.c (handle_one_xevent): Prevent selection events from
    reaching GTK if they are destined for an Emacs window.
---
 src/xterm.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/src/xterm.c b/src/xterm.c
index 4372fdb959..48f10269df 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -17877,6 +17877,12 @@ handle_one_xevent (struct x_display_info *dpyinfo,
       if (!x_window_to_frame (dpyinfo, event->xselection.requestor))
         goto OTHER;
 #endif /* not USE_X_TOOLKIT and not USE_GTK */
+#ifdef HAVE_GTK3
+      /* GTK 3 apparently chokes on these events since they have no
+        associated device.  (bug#56869, another bug as well that I
+        can't find) */
+      *finish = X_EVENT_DROP;
+#endif
       x_handle_selection_notify (&event->xselection);
       break;
 
@@ -17885,6 +17891,9 @@ handle_one_xevent (struct x_display_info *dpyinfo,
       if (!x_window_to_frame (dpyinfo, event->xselectionclear.window))
         goto OTHER;
 #endif /* not USE_X_TOOLKIT and not USE_GTK */
+#ifdef HAVE_GTK3
+      *finish = X_EVENT_DROP;
+#endif
       {
         const XSelectionClearEvent *eventp = &event->xselectionclear;
 
@@ -17911,6 +17920,9 @@ handle_one_xevent (struct x_display_info *dpyinfo,
       if (!x_window_to_frame (dpyinfo, event->xselectionrequest.owner))
         goto OTHER;
 #endif /* USE_X_TOOLKIT */
+#ifdef HAVE_GTK3
+      *finish = X_EVENT_DROP;
+#endif
       {
        const XSelectionRequestEvent *eventp = &event->xselectionrequest;
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]