OSX: horiz scrolling tweak for bbSystemEmitOSEvent
BlitzMax Forums/BlitzMax Module Tweaks/OSX: horiz scrolling tweak for bbSystemEmitOSEvent
| ||
The current Mac OS implementation of bbSystemEmitOSEvent neglects to handle horizontal scrolling (e.g., trackpad scrolling) when handling the ScrollWheel event. So, here's a fixed version of the routine: brl.mod/system.mod/system.macos.m Also, not sure why this puts the delta in the data field in the first place, but I left a comment about the backwards compatibility bit in the code if you don't care about breaking a few things (I'm not sure what those things are, but I'm sure someone has something that would be broken without also making data the Y delta). |
| ||
Works very well. |
| ||
Found this code useful for something I'm working on but I should add the following modification is also needed. maxgui.mod/cocoamaxgui.mod/cocoa.macos.m static int EmitMouseEvent( NSEvent *event,void *handle ){ if(([event type] == NSScrollWheel) && ([event deltaX] == 0) && ([event deltaY] == 0)) return 0; if(!HaltMouseEvents) return maxgui_cocoamaxgui_EmitCocoaMouseEvent( event,handle ); } Without this tweak horizontal scroll movements are only reported when a vertical scroll occurs. |
| ||
Has somebody an up to date code of this (first post)? It seems some things have changed in this section so I can't apply the tweak. |
| ||
Bump. I have tried to implement this but it always crashes (because I don't know anything about obj c). Could somebody be genrous enough and share an up to date tweak? |
| ||
Hmm. I did this a few months back. I dont think much has changed since then or? |
| ||
Well, I couldn't find the exact code which to replace and I fiddled around with it too long. Btw, all of the code is in the public domain anyway, so one can post the whole module code. So, could somebody share a working copy please? |
| ||
Bump again. Is there nobody that could upload a working version? Would really need this. Thanks. |