[client] provide better mouse tracking when exiting/entering the window

This commit is contained in:
Geoffrey McRae
2020-04-07 14:54:00 +10:00
parent cddeeff3fc
commit b5f4c639fd
2 changed files with 7 additions and 1 deletions

View File

@@ -860,10 +860,16 @@ int eventFilter(void * userdata, SDL_Event * event)
break;
case EnterNotify:
state.curLocalX = xe.xcrossing.x;
state.curLocalY = xe.xcrossing.y;
state.haveCurLocal = true;
handleWindowEnter();
break;
case LeaveNotify:
state.curLocalX = xe.xcrossing.x;
state.curLocalY = xe.xcrossing.y;
state.haveCurLocal = true;
handleWindowLeave();
break;
}