diff --git a/VERSION b/VERSION index 7c99d9d1..f2fb620c 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -B1-77-g80f3c7934a+1 \ No newline at end of file +B1-78-g05dc713dac+1 \ No newline at end of file diff --git a/client/src/main.c b/client/src/main.c index a0177ac5..87f71452 100644 --- a/client/src/main.c +++ b/client/src/main.c @@ -277,7 +277,7 @@ static int cursorThread(void * unused) state.lgr->on_mouse_event ( state.lgrData, - state.cursorVisible && state.drawCursor, + state.cursorVisible && state.drawCursor && state.cursorInView, state.cursor.x, state.cursor.y ); @@ -686,7 +686,17 @@ static void handleMouseMoveEvent(int ex, int ey) ex > state.dstRect.x + state.dstRect.w || ey < state.dstRect.y || ey > state.dstRect.y + state.dstRect.h) + { + state.cursorInView = false; + state.updateCursor = true; return; + } + } + + if (!state.cursorInView) + { + state.cursorInView = true; + state.updateCursor = true; } int rx = ex - state.curLastX; @@ -760,6 +770,7 @@ static void handleWindowLeave() return; state.drawCursor = false; + state.cursorInView = false; state.updateCursor = true; } diff --git a/client/src/main.h b/client/src/main.h index c2c0c1d1..34037afd 100644 --- a/client/src/main.h +++ b/client/src/main.h @@ -47,6 +47,7 @@ struct AppState bool serverMode; bool haveCursorPos; bool drawCursor; + bool cursorInView; bool updateCursor; float scaleX, scaleY; float accX, accY;