GHOST/Cocoa: revert tablet detection commit for continuous grab, apparently it is

already doing it and this change breaks something? Still it seems strange that it
is doing tablet stuff in this part of the code then.
This commit is contained in:
Brecht Van Lommel 2012-05-07 13:42:25 +00:00
parent 97df6dab2f
commit b613879f34

@ -1450,8 +1450,6 @@ GHOST_TSuccess GHOST_SystemCocoa::handleMouseEvent(void *eventPtr)
return GHOST_kFailure; return GHOST_kFailure;
} }
bool is_tablet = false;
switch ([event type]) switch ([event type])
{ {
case NSLeftMouseDown: case NSLeftMouseDown:
@ -1459,7 +1457,7 @@ GHOST_TSuccess GHOST_SystemCocoa::handleMouseEvent(void *eventPtr)
case NSOtherMouseDown: case NSOtherMouseDown:
pushEvent(new GHOST_EventButton([event timestamp]*1000, GHOST_kEventButtonDown, window, convertButton([event buttonNumber]))); pushEvent(new GHOST_EventButton([event timestamp]*1000, GHOST_kEventButtonDown, window, convertButton([event buttonNumber])));
//Handle tablet events combined with mouse events //Handle tablet events combined with mouse events
is_tablet = handleTabletEvent(event); handleTabletEvent(event);
break; break;
case NSLeftMouseUp: case NSLeftMouseUp:
@ -1467,21 +1465,25 @@ GHOST_TSuccess GHOST_SystemCocoa::handleMouseEvent(void *eventPtr)
case NSOtherMouseUp: case NSOtherMouseUp:
pushEvent(new GHOST_EventButton([event timestamp]*1000, GHOST_kEventButtonUp, window, convertButton([event buttonNumber]))); pushEvent(new GHOST_EventButton([event timestamp]*1000, GHOST_kEventButtonUp, window, convertButton([event buttonNumber])));
//Handle tablet events combined with mouse events //Handle tablet events combined with mouse events
is_tablet = handleTabletEvent(event); handleTabletEvent(event);
break; break;
case NSLeftMouseDragged: case NSLeftMouseDragged:
case NSRightMouseDragged: case NSRightMouseDragged:
case NSOtherMouseDragged: case NSOtherMouseDragged:
//Handle tablet events combined with mouse events //Handle tablet events combined with mouse events
is_tablet = handleTabletEvent(event); handleTabletEvent(event);
case NSMouseMoved: case NSMouseMoved:
{ {
GHOST_TGrabCursorMode grab_mode = window->getCursorGrabMode(); GHOST_TGrabCursorMode grab_mode = window->getCursorGrabMode();
if (is_tablet && window->getCursorGrabModeIsWarp()) /* TODO: CHECK IF THIS IS A TABLET EVENT */
bool is_tablet = false;
if (is_tablet && window->getCursorGrabModeIsWarp()) {
grab_mode = GHOST_kGrabDisable; grab_mode = GHOST_kGrabDisable;
}
switch (grab_mode) { switch (grab_mode) {
case GHOST_kGrabHide: //Cursor hidden grab operation : no cursor move case GHOST_kGrabHide: //Cursor hidden grab operation : no cursor move