Skip to content

Commit

Permalink
Fixed event spam caused by repeated calls to IME_SetTextInputRect()
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Jun 28, 2024
1 parent 5d1e2ad commit 8bf4545
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/video/windows/SDL_windowskeyboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -696,6 +696,10 @@ static void IME_SetTextInputRect(SDL_VideoData *videodata, const SDL_Rect *rect)
{
HIMC himc = 0;

if (SDL_memcmp(rect, &videodata->ime_rect, sizeof(*rect)) == 0) {
return;
}

videodata->ime_rect = *rect;

himc = ImmGetContext(videodata->ime_hwnd_current);
Expand Down

0 comments on commit 8bf4545

Please sign in to comment.