emacs-diffs
[Top][All Lists]
Advanced

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

feature/pgtk 6e5c2fb 2/2: Stop relying on `x_coalesce_scroll_events' in


From: Po Lu
Subject: feature/pgtk 6e5c2fb 2/2: Stop relying on `x_coalesce_scroll_events' in pgtk code
Date: Wed, 1 Dec 2021 08:52:04 -0500 (EST)

branch: feature/pgtk
commit 6e5c2fb468de23649c6df8710ec483e712894d8f
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Stop relying on `x_coalesce_scroll_events' in pgtk code
    
    * src/pgtkterm.c (scroll_event): Use
    `mwheel_coalesce_scroll_events'.
    (x_coalesce_scroll_events): Remove variable.
---
 src/pgtkterm.c | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)

diff --git a/src/pgtkterm.c b/src/pgtkterm.c
index 190436a..15d5fda 100644
--- a/src/pgtkterm.c
+++ b/src/pgtkterm.c
@@ -6037,7 +6037,7 @@ scroll_event (GtkWidget * widget, GdkEvent * event, 
gpointer * user_data)
       dpyinfo->scroll.acc_x += delta_x;
       dpyinfo->scroll.acc_y += delta_y;
       if (dpyinfo->scroll.acc_y >= dpyinfo->scroll.y_per_line
-         || !x_coalesce_scroll_events)
+         || !mwheel_coalesce_scroll_events)
        {
          int nlines = dpyinfo->scroll.acc_y / dpyinfo->scroll.y_per_line;
          inev.ie.kind = WHEEL_EVENT;
@@ -6045,7 +6045,7 @@ scroll_event (GtkWidget * widget, GdkEvent * event, 
gpointer * user_data)
          inev.ie.arg = list3 (make_fixnum (nlines),
                               make_float (-dpyinfo->scroll.acc_x * 100),
                               make_float (-dpyinfo->scroll.acc_y * 100));
-         if (!x_coalesce_scroll_events)
+         if (!mwheel_coalesce_scroll_events)
            {
              dpyinfo->scroll.acc_y = 0;
              dpyinfo->scroll.acc_x = 0;
@@ -6056,7 +6056,7 @@ scroll_event (GtkWidget * widget, GdkEvent * event, 
gpointer * user_data)
            }
        }
       else if (dpyinfo->scroll.acc_y <= -dpyinfo->scroll.y_per_line
-              || !x_coalesce_scroll_events)
+              || !mwheel_coalesce_scroll_events)
        {
          int nlines = -dpyinfo->scroll.acc_y / dpyinfo->scroll.y_per_line;
          inev.ie.kind = WHEEL_EVENT;
@@ -6065,7 +6065,7 @@ scroll_event (GtkWidget * widget, GdkEvent * event, 
gpointer * user_data)
                               make_float (-dpyinfo->scroll.acc_x * 100),
                               make_float (-dpyinfo->scroll.acc_y * 100));
 
-         if (!x_coalesce_scroll_events)
+         if (!mwheel_coalesce_scroll_events)
            {
              dpyinfo->scroll.acc_y = 0;
              dpyinfo->scroll.acc_x = 0;
@@ -6074,7 +6074,7 @@ scroll_event (GtkWidget * widget, GdkEvent * event, 
gpointer * user_data)
            dpyinfo->scroll.acc_y -= -dpyinfo->scroll.y_per_line * nlines;
        }
       else if (dpyinfo->scroll.acc_x >= dpyinfo->scroll.x_per_char
-              || !x_coalesce_scroll_events)
+              || !mwheel_coalesce_scroll_events)
        {
          int nchars = dpyinfo->scroll.acc_x / dpyinfo->scroll.x_per_char;
          inev.ie.kind = HORIZ_WHEEL_EVENT;
@@ -6083,7 +6083,7 @@ scroll_event (GtkWidget * widget, GdkEvent * event, 
gpointer * user_data)
                               make_float (-dpyinfo->scroll.acc_x * 100),
                               make_float (-dpyinfo->scroll.acc_y * 100));
 
-         if (x_coalesce_scroll_events)
+         if (mwheel_coalesce_scroll_events)
            dpyinfo->scroll.acc_x -= dpyinfo->scroll.x_per_char * nchars;
          else
            {
@@ -6100,7 +6100,7 @@ scroll_event (GtkWidget * widget, GdkEvent * event, 
gpointer * user_data)
                               make_float (-dpyinfo->scroll.acc_x * 100),
                               make_float (-dpyinfo->scroll.acc_y * 100));
 
-         if (x_coalesce_scroll_events)
+         if (mwheel_coalesce_scroll_events)
            dpyinfo->scroll.acc_x -= -dpyinfo->scroll.x_per_char * nchars;
          else
            {
@@ -6799,10 +6799,6 @@ If set to a non-float value, there will be no wait at 
all.  */);
   window_being_scrolled = Qnil;
   staticpro (&window_being_scrolled);
 
-  DEFVAR_BOOL ("x-coalesce-scroll-events", x_coalesce_scroll_events,
-              doc: /* SKIP: real doc in xterm.c.  */);
-  x_coalesce_scroll_events = true;
-
   /* Tell Emacs about this window system.  */
   Fprovide (Qpgtk, Qnil);
 }



reply via email to

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