Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions icd/vksc_display_emulation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,10 @@ VkResult Display::CreateSurface(Instance& instance, DisplayMode& display_mode, c
surface_->message_handler = std::thread([this] {
bool quit = false;
while (!quit) {
if (xcb_connection_has_error(surface_->connection)) {
quit = true;
break;
}
xcb_generic_event_t* event = nullptr;
event = xcb_wait_for_event(surface_->connection);
if (event != nullptr) {
Expand Down Expand Up @@ -441,6 +445,7 @@ void Display::DestroySurface() {
event.window = surface_->window;
xcb_send_event(surface_->connection, false, surface_->window,
XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT | XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY, (const char*)&event);
xcb_flush(surface_->connection);
surface_->message_handler.join();

xcb_destroy_window(surface_->connection, surface_->window);
Expand Down