pharo-graphics / Bloc

Low-level UI infrastructure & framework for Pharo
MIT License
80 stars 40 forks source link

About redrawing while the SDL2 window is being resized #569

Open tinchodias opened 1 month ago

tinchodias commented 1 month ago

As you know, Bloc and Pharo IDE in a SDL2 OS Window can't redraw while a window is being resized by the user: sdl2_resize_blocked

This is an old issue in SDL2 and I read news from 2024 with two possible solutions for us: one is only in the new SDL3, and the other a workaround in SDL2.

If we create (or upgrade) bindings to SDL3 (I checked the migration guide and it may require mostly renaming functions). This is the solution: https://wiki.libsdl.org/SDL3/README/main-functions#how-to-use-main-callbacks-in-sdl3.

The workaround in SDL2 uses SDL_WINDOWEVENT_EXPOSED and SDL_AddEventWatch: https://discourse.libsdl.org/t/window-event-at-initiation-of-window-resize/50963

I create this issue as a reminder to check the technical details (@tesonep ?)

tinchodias commented 1 month ago

Read also: