[Wayland-bugs] [Bug 765907] [Wayland] Reversed scrolling in GtkMenu

gtk+ (GNOME Bugzilla) bugzilla at gnome.org
Tue May 3 08:04:46 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=765907

--- Comment #2 from Olivier Fourdan <ofourdan at redhat.com> ---
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()
https://git.gnome.org/browse/gtk+/tree/gtk/gtkmenu.c#n3551 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.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/wayland-bugs/attachments/20160503/71026096/attachment.html>


More information about the wayland-bugs mailing list