aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPo Lu2022-08-12 09:25:12 +0800
committerPo Lu2022-08-12 09:25:12 +0800
commit05c4e7bfbdc5c0ed462be7356e6841e1e59d3851 (patch)
tree34c758a297fb6d89ac6308d1c1fb4c780b609c74 /src
parent48215c41d16fadb69e85121b3baca0dfca82cc44 (diff)
downloademacs-05c4e7bfbdc5c0ed462be7356e6841e1e59d3851.tar.gz
emacs-05c4e7bfbdc5c0ed462be7356e6841e1e59d3851.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/xterm.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 4372fdb959d..48f10269dfc 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -17877,6 +17877,12 @@ handle_one_xevent (struct x_display_info *dpyinfo,
17877 if (!x_window_to_frame (dpyinfo, event->xselection.requestor)) 17877 if (!x_window_to_frame (dpyinfo, event->xselection.requestor))
17878 goto OTHER; 17878 goto OTHER;
17879#endif /* not USE_X_TOOLKIT and not USE_GTK */ 17879#endif /* not USE_X_TOOLKIT and not USE_GTK */
17880#ifdef HAVE_GTK3
17881 /* GTK 3 apparently chokes on these events since they have no
17882 associated device. (bug#56869, another bug as well that I
17883 can't find) */
17884 *finish = X_EVENT_DROP;
17885#endif
17880 x_handle_selection_notify (&event->xselection); 17886 x_handle_selection_notify (&event->xselection);
17881 break; 17887 break;
17882 17888
@@ -17885,6 +17891,9 @@ handle_one_xevent (struct x_display_info *dpyinfo,
17885 if (!x_window_to_frame (dpyinfo, event->xselectionclear.window)) 17891 if (!x_window_to_frame (dpyinfo, event->xselectionclear.window))
17886 goto OTHER; 17892 goto OTHER;
17887#endif /* not USE_X_TOOLKIT and not USE_GTK */ 17893#endif /* not USE_X_TOOLKIT and not USE_GTK */
17894#ifdef HAVE_GTK3
17895 *finish = X_EVENT_DROP;
17896#endif
17888 { 17897 {
17889 const XSelectionClearEvent *eventp = &event->xselectionclear; 17898 const XSelectionClearEvent *eventp = &event->xselectionclear;
17890 17899
@@ -17911,6 +17920,9 @@ handle_one_xevent (struct x_display_info *dpyinfo,
17911 if (!x_window_to_frame (dpyinfo, event->xselectionrequest.owner)) 17920 if (!x_window_to_frame (dpyinfo, event->xselectionrequest.owner))
17912 goto OTHER; 17921 goto OTHER;
17913#endif /* USE_X_TOOLKIT */ 17922#endif /* USE_X_TOOLKIT */
17923#ifdef HAVE_GTK3
17924 *finish = X_EVENT_DROP;
17925#endif
17914 { 17926 {
17915 const XSelectionRequestEvent *eventp = &event->xselectionrequest; 17927 const XSelectionRequestEvent *eventp = &event->xselectionrequest;
17916 17928