forked from bartvdbraak/blender
disable warping for tablet events (X11 only), added TODO's for OSX and win32.
This commit is contained in:
parent
a058ac9c50
commit
4504c66124
@ -1488,7 +1488,19 @@ GHOST_TSuccess GHOST_SystemCocoa::handleMouseEvent(void *eventPtr)
|
||||
}
|
||||
|
||||
case NSMouseMoved:
|
||||
switch (window->getCursorGrabMode()) {
|
||||
GHOST_TGrabCursorMode grab_mode = window->getCursorGrabMode();
|
||||
|
||||
/* TODO: CHECK IF THIS IS A TABLET EVENT */
|
||||
bool is_tablet = false;
|
||||
|
||||
if (is_tablet &&
|
||||
(grab_mode != GHOST_kGrabDisable) &&
|
||||
(grab_mode != GHOST_kGrabNormal))
|
||||
{
|
||||
grab_mode = GHOST_kGrabDisable;
|
||||
}
|
||||
|
||||
switch (grab_mode) {
|
||||
case GHOST_kGrabHide: //Cursor hidden grab operation : no cursor move
|
||||
{
|
||||
GHOST_TInt32 x_warp, y_warp, x_accum, y_accum, x, y;
|
||||
|
@ -649,7 +649,12 @@ GHOST_EventCursor* GHOST_SystemWin32::processCursorEvent(GHOST_TEventType type,
|
||||
|
||||
system->getCursorPosition(x_screen, y_screen);
|
||||
|
||||
if(window->getCursorGrabMode() != GHOST_kGrabDisable && window->getCursorGrabMode() != GHOST_kGrabNormal)
|
||||
/* TODO: CHECK IF THIS IS A TABLET EVENT */
|
||||
bool is_tablet = false;
|
||||
|
||||
if (is_tablet == false &&
|
||||
window->getCursorGrabMode() != GHOST_kGrabDisable &&
|
||||
window->getCursorGrabMode() != GHOST_kGrabNormal)
|
||||
{
|
||||
GHOST_TInt32 x_new= x_screen;
|
||||
GHOST_TInt32 y_new= y_screen;
|
||||
|
@ -472,7 +472,15 @@ GHOST_SystemX11::processEvent(XEvent *xe)
|
||||
{
|
||||
XMotionEvent &xme = xe->xmotion;
|
||||
|
||||
if(window->getCursorGrabMode() != GHOST_kGrabDisable && window->getCursorGrabMode() != GHOST_kGrabNormal)
|
||||
#ifdef WITH_X11_XINPUT
|
||||
bool is_tablet = window->GetXTablet().CommonData.Active != GHOST_kTabletModeNone;
|
||||
#else
|
||||
bool is_tablet = false;
|
||||
#endif
|
||||
|
||||
if(is_tablet == false &&
|
||||
window->getCursorGrabMode() != GHOST_kGrabDisable &&
|
||||
window->getCursorGrabMode() != GHOST_kGrabNormal)
|
||||
{
|
||||
GHOST_TInt32 x_new= xme.x_root;
|
||||
GHOST_TInt32 y_new= xme.y_root;
|
||||
|
Loading…
Reference in New Issue
Block a user