[Bf-committers] Mouse wheel for X11
Chris Want
bf-committers@blender.org
Mon, 27 Jan 2003 21:23:12 -0700
It doesn't work here...
Regards,
Chris
P.S. the line "if (xe->xbutton.button == 4 || xe->xbutton.button == 5)"
seems redundant (the switch handles that).
Martin Vollrathson wrote:
> I made a small patch for
> /blender/intern/ghost/intern/GHOST_SystemX11.cpp to get mouse wheel
> support under X11. It seems to work.
>
> /Martin Vollrathson
>
>
> ------------------------------------------------------------------------
>
> --- GHOST_SystemX11.cpp 2002-12-19 21:08:12.000000000 +0100
> +++ /home/mavos/GHOST_SystemX11.cpp 2003-01-28 02:57:27.000000000 +0100
> @@ -71,6 +71,7 @@
> #include "GHOST_EventCursor.h"
> #include "GHOST_EventKey.h"
> #include "GHOST_EventButton.h"
> +#include "GHOST_EventWheel.h"
> #include "GHOST_DisplayManagerX11.h"
>
> #include "GHOST_Debug.h"
> @@ -380,7 +381,22 @@
>
> break;
> }
> +
> case ButtonPress:
> + {
> + if (xe->xbutton.button == 4 || xe->xbutton.button == 5) {
> + switch (xe->xbutton.button) {
> + case 4:
> + g_event = new GHOST_EventWheel(getMilliSeconds(), window, 3);
> + break;
> + case 5:
> + g_event = new GHOST_EventWheel(getMilliSeconds(), window, -3);
> + break;
> + }
> +
> + break;
> + }
> + }
> case ButtonRelease:
> {
>