unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* pgtk mouse wheel speed
@ 2021-11-13 10:05 Jindřich Makovička
  2021-11-13 10:18 ` Po Lu
  0 siblings, 1 reply; 2+ messages in thread
From: Jindřich Makovička @ 2021-11-13 10:05 UTC (permalink / raw)
  To: emacs-devel

Hi,

I am really happy with the PGTK Emacs so far - about the only thing
that annoys me is the mouse scrolling wheel behavior - setting the
_per_char parameters to 2 cause Emacs to ignore every second mouse
wheel "click", which makes the scrolling really slow, at least when
one is used to the scroll rate of 5 lines per wheel click the ordinary
X Emacs uses.

I am currently applying the patch below to bring things back to normal
- is there any way to override the scrolling speed without patching the
source?


From ef7b0931cf1687b4d3af71ff1eda7a70f594be52 Mon Sep 17 00:00:00 2001
From: Jindřich Makovička <makovick@gmail.com>
Date: Sun, 25 Jul 2021 09:39:46 +0200
Subject: Scroll by 5 chars/lines per mouse whell click


diff --git a/src/pgtkterm.c b/src/pgtkterm.c
index 86074d010d..adf8b77909 100644
--- a/src/pgtkterm.c
+++ b/src/pgtkterm.c
@@ -7006,8 +7006,8 @@ #define NUM_ARGV 10
   }
 
   /* smooth scroll setting */
-  dpyinfo->scroll.x_per_char = 2;
-  dpyinfo->scroll.y_per_line = 2;
+  dpyinfo->scroll.x_per_char = 1.0/5;
+  dpyinfo->scroll.y_per_line = 1.0/5;
 
   x_setup_pointer_blanking (dpyinfo);


Regards,
-- 
Jindrich Makovicka



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: pgtk mouse wheel speed
  2021-11-13 10:05 pgtk mouse wheel speed Jindřich Makovička
@ 2021-11-13 10:18 ` Po Lu
  0 siblings, 0 replies; 2+ messages in thread
From: Po Lu @ 2021-11-13 10:18 UTC (permalink / raw)
  To: Jindřich Makovička; +Cc: emacs-devel

Jindřich Makovička <makovick@gmail.com> writes:

> I am really happy with the PGTK Emacs so far - about the only thing
> that annoys me is the mouse scrolling wheel behavior - setting the
> _per_char parameters to 2 cause Emacs to ignore every second mouse
> wheel "click", which makes the scrolling really slow, at least when
> one is used to the scroll rate of 5 lines per wheel click the ordinary
> X Emacs uses.
>
> I am currently applying the patch below to bring things back to normal
> - is there any way to override the scrolling speed without patching the
> source?

Why not utilize the pixel-based scroll events that GTK+ gives?
Something like the NS port, which sums up pixels until they exceed the
frame's line height, before sending a wheel event.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-11-13 10:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-13 10:05 pgtk mouse wheel speed Jindřich Makovička
2021-11-13 10:18 ` Po Lu

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).