[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [gnome-love] Re: GTK+, horizontal scrolling and mice with two wheels
- From: Thomas Broyer <tbroyer ltgt net>
- To: gnome-love gnome org
- Subject: Re: [gnome-love] Re: GTK+, horizontal scrolling and mice with two wheels
- Date: Tue, 29 May 2001 20:32:26 +0200
Le 29/05/01 20:30:56, Thomas Broyer a écrit :
> The attached patch corrects this (it actually replaces the previous
> patch)
...only if I attach it ;o)
Tom.
--- gdk/x11/gdkevents-x11.c.old Tue May 29 18:16:35 2001
+++ gdk/x11/gdkevents-x11.c Tue May 29 18:27:54 2001
@@ -650,11 +650,14 @@
/* If we get a ButtonPress event where the button is 4 or 5,
it's a Scroll event */
- if (xevent->xbutton.button == 4 || xevent->xbutton.button == 5)
+ if (xevent->xbutton.button == 4 || xevent->xbutton.button == 5
+ || xevent->xbutton.button == 6 || xevent->xbutton.button == 7)
{
event->scroll.type = GDK_SCROLL;
event->scroll.direction = (xevent->xbutton.button == 4) ?
- GDK_SCROLL_UP : GDK_SCROLL_DOWN;
+ GDK_SCROLL_UP : (xevent->xbutton.button == 5) ?
+ GDK_SCROLL_DOWN : (xevent->xbutton.button == 6) ?
+ GDK_SCROLL_LEFT : GDK_SCROLL_RIGHT;
event->scroll.window = window;
event->scroll.time = xevent->xbutton.x;
event->scroll.x = xevent->xbutton.x + xoffset;
@@ -699,7 +702,8 @@
}
/* We treat button presses as scroll wheel events, so ignore the release */
- if (xevent->xbutton.button == 4 || xevent->xbutton.button == 5)
+ if (xevent->xbutton.button == 4 || xevent->xbutton.button == 5
+ || xevent->xbutton.button == 6 || xevent->xbutton.button == 7)
{
return_val = FALSE;
break;
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]