[Bf-committers] Mouse wheel for X11
Martin Vollrathson
bf-committers@blender.org
Tue, 28 Jan 2003 05:42:14 +0100
Chris Want wrote:
> It doesn't work here...
That's strange, because as far as I can tell, it works just fine for me.
>
> Regards,
> Chris
>
> P.S. the line "if (xe->xbutton.button == 4 || xe->xbutton.button == 5)"
> seems redundant (the switch handles that).
It's not very pretty but I think I needed that in order to jump out from
case ButtonPress before entering ButtonRelease if either of buttons 4
and 5 were pressed.
Like I said, it's not very pretty and someone else, being less tired and
confused, could probably improve it.
>
> 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:
>> {
>>
>
>
>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers@blender.org
> http://www.blender.org/mailman/listinfo/bf-committers
>
>