diff --git a/src/video/wayland/SDL_waylandevents.c b/src/video/wayland/SDL_waylandevents.c index 5d4bf4b04b..08c012a4f3 100644 --- a/src/video/wayland/SDL_waylandevents.c +++ b/src/video/wayland/SDL_waylandevents.c @@ -3654,8 +3654,6 @@ void Wayland_DisplayCreateSeat(SDL_VideoData *display, struct wl_seat *wl_seat, if (display->tablet_manager) { Wayland_SeatInitTabletSupport(seat); } - - WAYLAND_wl_display_flush(display->display); } void Wayland_DisplayRemoveWindowReferencesFromSeats(SDL_VideoData *display, SDL_WindowData *window) diff --git a/src/video/wayland/SDL_waylandvideo.c b/src/video/wayland/SDL_waylandvideo.c index d4f97f6547..cd81e327b6 100644 --- a/src/video/wayland/SDL_waylandvideo.c +++ b/src/video/wayland/SDL_waylandvideo.c @@ -461,7 +461,6 @@ static void Wayland_DeleteDevice(SDL_VideoDevice *device) { SDL_VideoData *data = device->internal; if (data->display && !data->display_externally_owned) { - WAYLAND_wl_display_flush(data->display); WAYLAND_wl_display_disconnect(data->display); SDL_ClearProperty(SDL_GetGlobalProperties(), SDL_PROP_GLOBAL_VIDEO_WAYLAND_WL_DISPLAY_POINTER); } @@ -1454,9 +1453,6 @@ bool Wayland_VideoInit(SDL_VideoDevice *_this) Wayland_FinalizeDisplays(data); Wayland_InitMouse(); - - WAYLAND_wl_display_flush(data->display); - Wayland_InitKeyboard(_this); if (data->primary_selection_device_manager) { diff --git a/src/video/wayland/SDL_waylandwindow.c b/src/video/wayland/SDL_waylandwindow.c index 2e8b65bb0c..ee30e62328 100644 --- a/src/video/wayland/SDL_waylandwindow.c +++ b/src/video/wayland/SDL_waylandwindow.c @@ -2027,8 +2027,7 @@ void Wayland_ShowWindow(SDL_VideoDevice *_this, SDL_Window *window) if (data->shell_surface_type == WAYLAND_SHELL_SURFACE_TYPE_LIBDECOR) { if (data->shell_surface.libdecor.frame) { while (data->shell_surface_status == WAYLAND_SHELL_SURFACE_STATUS_WAITING_FOR_CONFIGURE) { - WAYLAND_wl_display_flush(c->display); - WAYLAND_wl_display_dispatch(c->display); + libdecor_dispatch(c->shell.libdecor, -1); } } } else @@ -2041,7 +2040,6 @@ void Wayland_ShowWindow(SDL_VideoDevice *_this, SDL_Window *window) wl_surface_commit(data->surface); if (data->shell_surface.xdg.surface) { while (data->shell_surface_status == WAYLAND_SHELL_SURFACE_STATUS_WAITING_FOR_CONFIGURE) { - WAYLAND_wl_display_flush(c->display); WAYLAND_wl_display_dispatch(c->display); } } @@ -3266,7 +3264,6 @@ void Wayland_DestroyWindow(SDL_VideoDevice *_this, SDL_Window *window) wind->icon_buffer_count = 0; SDL_free(wind); - WAYLAND_wl_display_flush(data->display); } window->internal = NULL; }