<html>
<head>
<base href="https://bugzilla.gnome.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - [Wayland] Reversed scrolling in GtkMenu"
href="https://bugzilla.gnome.org/show_bug.cgi?id=765907#c2">Comment # 2</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - [Wayland] Reversed scrolling in GtkMenu"
href="https://bugzilla.gnome.org/show_bug.cgi?id=765907">bug 765907</a>
from <span class="vcard"><a href="page.cgi?id=describeuser.html&login=ofourdan%40redhat.com" title="Olivier Fourdan <ofourdan@redhat.com>"> <span class="fn">Olivier Fourdan</span></a>
</span></b>
<pre>OK, so it all comes down to gdk events...
With X11 backend, using the mouse wheel we get GDK_SCROLL_UP when rolling the
wheel toward the front and GDK_SCROLL_DOWN when rolling the mouse wheel toward
the back (this is expected with my current setup, not using "natural"
scrolling).
When usign the touchpad, we also get GDK_SCROLL_SMOOTH events, but the
GDK_SCROLL_UP/GDK_SCROLL_DOWN take precedence in gtk_menu_scroll()
<a href="https://git.gnome.org/browse/gtk+/tree/gtk/gtkmenu.c#n3551">https://git.gnome.org/browse/gtk+/tree/gtk/gtkmenu.c#n3551</a> so we always scroll
by MENU_SCROLL_STEP2.
With the Wayland backend, we get the opposite, using the mouse wheel we get
GDK_SCROLL_DOWN when rolling the wheel toward the front and GDK_SCROLL_UP when
rolling the mouse wheel toward the back, which explains why the scrolling goes
int he opposite direction (as compared to the X1 backend).
When using the the touchpad on the menu under Wayland, we get only
GDK_SCROLL_SMOOTH so we scroll by the value provided by event->delta_y which is
much smaller than MENU_SCROLL_STEP2, which explains why the scrollign is much
slower than under X11.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>