Skip to content

Commit 550d95e

Browse files
committed
wayland: Cleanup an outdated conditional and comment
There may have been a reason for not attaching a null buffer when destroying a popup at some point in the past, but that is unnecessary now, as is the comment about ShowWindow crashing, as ShowWindow assures that a null buffer is attached before (re)creating the window.
1 parent 9034375 commit 550d95e

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/video/wayland/SDL_waylandwindow.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2164,11 +2164,9 @@ void Wayland_HideWindow(SDL_VideoDevice *_this, SDL_Window *window)
21642164
}
21652165
}
21662166

2167-
// Be sure to detach after this is done, otherwise ShowWindow crashes!
2168-
if (wind->shell_surface_type != WAYLAND_SHELL_SURFACE_TYPE_XDG_POPUP) {
2169-
wl_surface_attach(wind->surface, NULL, 0, 0);
2170-
wl_surface_commit(wind->surface);
2171-
}
2167+
// Attach a null buffer to unmap the surface.
2168+
wl_surface_attach(wind->surface, NULL, 0, 0);
2169+
wl_surface_commit(wind->surface);
21722170

21732171
SDL_zero(wind->shell_surface);
21742172
wind->show_hide_sync_required = true;

0 commit comments

Comments
 (0)