Subject: bug#70002: 29.2; GTK3 mouse wheel scrolling

From: "Sparapani, Rodney" <[email-masked]>
Date: Tue, 26 Mar 2024 15:12:11 +0000

Hi Eli and Po:

I spent some time trying to understand the code for the XSync suggestion.
But I couldn’t really get much traction: it is over my head.  Then I found a
configuration switch that I hadn’t seen before in PROBLEMS…

--without-toolkit-scroll-bars

So I went back to Athena.  Everything was working except the scroll-bars
and this works around that issue.

configure --without-toolkit-scroll-bars --with-x-toolkit=athena

So #69870 and #70002 are still open bugs.  But, my users will be
very happy that the scroll-bars, menu-bar and mouse-wheel are
now working!  Thanks for your diligent support of emacs.  Not many
software packages that were invented in the 70s are still around.
--
Rodney Sparapani, Associate Professor of Biostatistics, He/Him/His
Vice President, Wisconsin Chapter of the American Statistical Association
Institute for Health and Equity, Division of Biostatistics
Medical College of Wisconsin, Milwaukee Campus

If this is outside of working hours, then please respond when convenient.

From: Po Lu <[email-masked]>
Date: Monday, March 25, 2024 at 7:30 PM
To: Sparapani, Rodney <[email-masked]>
Cc: Eli Zaretskii <[email-masked]>, [email-masked] <[email-masked]>
Subject: Re: bug#70002: 29.2; GTK3 mouse wheel scrolling
ATTENTION: This email originated from a sender outside of MCW. Use caution when clicking on links or opening attachments.
________________________________

"Sparapani, Rodney" <[email-masked]> writes:

> Well, here’s my real issue.  We had trouble with LUCID scroll bars.
> So we can fix that with either MOTIF or GTK.  But with MOTIF, I have a
> similar problem with the menu-bar: it is slow.  A click on it takes a
> while: I just counted 20s.  Then it typically works as advertised, but
> the wait is painful (see bug#69870).  And as we see here, the GTK
> menu-bar is fine, but mouse wheel scrolling doesn’t work very well.
> Is there a simple was a way that we can get working scroll-bars,
> menu-bar and mouse-wheel support?  Is there a clever configuration
> that can do that?  I suppose mixing toolkits doesn’t work.  But is
> there something else that I can try?  Thanks for all of your help on
> emacs!

This leads me to believe that you're displaying Emacs over a remote
connection to your X server, which the toolkits cannot exercise
efficiently, because they synchronize (or require us to synchronize)
with the X server whenever certain widgets are created, activated or
modified, suspending themselves for a period equal to the connection's
roundtrip time.  Multiply this by the number of scroll bar events
received or menu bar widgets created, and the delay becomes a visible
pause after each such event.

Motif's behavior we're not in a position to fix, but some clever fellow
could probably mitigate the synchronization overhead in
xg_update_scrollbar_pos by dispensing with the call to XSync if it can
be assumed that Emacs will soon return to xg_select.  In the interim, I
suggest building Emacs with _no_ X toolkit, a configuration specifically
optimized for such environments.