Skip to content

Commit

Permalink
fix(linux): Fix crash on resize with wayland
Browse files Browse the repository at this point in the history
  • Loading branch information
bryphe authored Jun 3, 2021
1 parent 79c2572 commit 9ec44ff
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/reason-sdl2/src/sdl2_wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1645,7 +1645,13 @@ extern "C" {
SDL_GetError());
}

// Only add the resize-event-watcher for OSX, since it's the platform that requires this to get
// real-time resize notifications + re-renders.
// This change caused a crash in Linux + Wayland: https://github.com/onivim/oni2/issues/3646
// (with the crash callstack pointing to an error acquiring runtime lock after rendering)
#ifdef __APPLE__
SDL_AddEventWatch(resdl_eventWatcher, NULL);
#endif

vWindow = resdl_wrapPointer(win);
CAMLreturn(vWindow);
Expand Down

0 comments on commit 9ec44ff

Please sign in to comment.