Handle window events only once visible
This will avoid corner cases where we need to resize while no frame has been received yet.
This commit is contained in:
parent
a566635c43
commit
626094ad13
1 changed files with 3 additions and 1 deletions
|
@ -184,7 +184,9 @@ handle_event(SDL_Event *event, const struct scrcpy_options *options) {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SDL_WINDOWEVENT:
|
case SDL_WINDOWEVENT:
|
||||||
screen_handle_window_event(&screen, &event->window);
|
if (screen.has_frame) {
|
||||||
|
screen_handle_window_event(&screen, &event->window);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case SDL_TEXTINPUT:
|
case SDL_TEXTINPUT:
|
||||||
if (!options->control) {
|
if (!options->control) {
|
||||||
|
|
Loading…
Reference in a new issue