From: Po Lu Date: Wed, 1 Dec 2021 13:50:43 +0000 (+0800) Subject: Stop relying on `x_coalesce_scroll_events' in pgtk code X-Git-Tag: emacs-29.0.90~3631 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6e5c2fb468de23649c6df8710ec483e712894d8f;p=emacs.git 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. --- diff --git a/src/pgtkterm.c b/src/pgtkterm.c index 190436a82d2..15d5fda105f 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); }