mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-02-21 10:56:41 +00:00
wayland: Remove unnecessary flushes
Events are implicitly flushed during blocking dispatches and round-trips. Remove some unnecessary uses of wl_display_flush().
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user