[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 6b71b80fdc: Fix odd scrolling bugs on LessTif
From: |
Po Lu |
Subject: |
master 6b71b80fdc: Fix odd scrolling bugs on LessTif |
Date: |
Tue, 1 Mar 2022 20:39:16 -0500 (EST) |
branch: master
commit 6b71b80fdcf32aed5191898e7339ffb9dcd29005
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Fix odd scrolling bugs on LessTif
* src/xterm.c (handle_one_xevent): Give emulated button events
to Motif.
---
src/xterm.c | 29 ++++++++++++++++++++---------
1 file changed, 20 insertions(+), 9 deletions(-)
diff --git a/src/xterm.c b/src/xterm.c
index f5ce42fc27..3f69300417 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -12035,17 +12035,13 @@ handle_one_xevent (struct x_display_info *dpyinfo,
struct xwidget_view *xvw;
#endif
-#ifdef HAVE_XINPUT2_1
- /* Ignore emulated scroll events when XI2 native
- scroll events are present. */
- if (xev->flags & XIPointerEmulated)
- {
- *finish = X_EVENT_DROP;
- goto XI_OTHER;
- }
+#ifdef USE_MOTIF
+#ifdef USE_TOOLKIT_SCROLL_BARS
+ struct scroll_bar *bar
+ = x_window_to_scroll_bar (dpyinfo->display,
+ xev->event, 2);
#endif
-#ifdef USE_MOTIF
use_copy = true;
copy.xbutton.type = (xev->evtype == XI_ButtonPress
? ButtonPress : ButtonRelease);
@@ -12075,6 +12071,21 @@ handle_one_xevent (struct x_display_info *dpyinfo,
}
#endif
+#ifdef HAVE_XINPUT2_1
+ /* Ignore emulated scroll events when XI2 native
+ scroll events are present. */
+ if (xev->flags & XIPointerEmulated)
+ {
+#if !defined USE_MOTIF || !defined USE_TOOLKIT_SCROLL_BARS
+ *finish = X_EVENT_DROP;
+#else
+ if (bar)
+ *finish = X_EVENT_DROP;
+#endif
+ goto XI_OTHER;
+ }
+#endif
+
if (xev->evtype == XI_ButtonPress)
x_display_set_last_user_time (dpyinfo, xev->time);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 6b71b80fdc: Fix odd scrolling bugs on LessTif,
Po Lu <=