Skip to content

Commit 9de43cc

Browse files
authored
Merge pull request #303 from mrikola/focus-mouse-on-startup
Improve mouse focus logic
2 parents cf38c30 + 5aa6aef commit 9de43cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Libraries/INPUT/Source/sdl_events.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ void SetMouseXY(int mx, int my)
266266
}
267267

268268
bool inside = (mx >= x && mx < x+w && my >= y && my < y+h);
269-
bool focus = (SDL_GetWindowFlags(window) & SDL_WINDOW_INPUT_FOCUS);
269+
bool focus = (SDL_GetWindowFlags(window) & SDL_WINDOW_MOUSE_FOCUS);
270270

271271
if (!inside && focus)
272272
{

0 commit comments

Comments
 (0)