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:
Romain Vimont 2021-02-12 23:18:13 +01:00
parent a566635c43
commit 626094ad13

View file

@ -184,7 +184,9 @@ handle_event(SDL_Event *event, const struct scrcpy_options *options) {
}
break;
case SDL_WINDOWEVENT:
if (screen.has_frame) {
screen_handle_window_event(&screen, &event->window);
}
break;
case SDL_TEXTINPUT:
if (!options->control) {