File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -599,16 +599,6 @@ void Wayland_PumpEvents(SDL_VideoDevice *_this)
599599 }
600600#endif
601601
602- // Synthesize key repeat events.
603- wl_list_for_each (seat , & d -> seat_list , link ) {
604- if (keyboard_repeat_is_set (& seat -> keyboard .repeat )) {
605- Wayland_SeatSetKeymap (seat );
606-
607- const Uint64 elapsed = SDL_GetTicksNS () - seat -> keyboard .repeat .sdl_press_time_ns ;
608- keyboard_repeat_handle (& seat -> keyboard .repeat , elapsed );
609- }
610- }
611-
612602#ifdef HAVE_LIBDECOR_H
613603 if (d -> shell .libdecor ) {
614604 libdecor_dispatch (d -> shell .libdecor , 0 );
@@ -661,6 +651,18 @@ void Wayland_PumpEvents(SDL_VideoDevice *_this)
661651 ret = WAYLAND_wl_display_dispatch_pending (d -> display );
662652 }
663653
654+ if (ret >= 0 ) {
655+ // Synthesize key repeat events.
656+ wl_list_for_each (seat , & d -> seat_list , link ) {
657+ if (keyboard_repeat_is_set (& seat -> keyboard .repeat )) {
658+ Wayland_SeatSetKeymap (seat );
659+
660+ const Uint64 elapsed = SDL_GetTicksNS () - seat -> keyboard .repeat .sdl_press_time_ns ;
661+ keyboard_repeat_handle (& seat -> keyboard .repeat , elapsed );
662+ }
663+ }
664+ }
665+
664666connection_error :
665667 if (ret < 0 && !d -> display_disconnected ) {
666668 /* Something has failed with the Wayland connection -- for example,
You can’t perform that action at this time.
0 commit comments