ArjunNair / egui_sdl2_gl

Egui backend for SDL2 + OpenGL
MIT License
51 stars 35 forks source link

Multi window support #11

Closed Yamakaky closed 2 years ago

Yamakaky commented 3 years ago

When detecting window resize events, it doesn't check which window is resized. When multiple windows are used, events from other windows will affect egui. The fix is to check like this: https://github.com/Yamakaky/gyromouse/blob/gui/src/backend/sdl/overlay.rs#L221-L225.

https://github.com/ArjunNair/egui_sdl2_gl/blob/main/src/lib.rs#L54-L57

ArjunNair commented 3 years ago

Good point! I'll integrate that fix asap.

ArjunNair commented 2 years ago

I've added the suggested fixes. Would appreciate it you can confirm they look good.

Yamakaky commented 2 years ago

Just found out that we have the same problem for keyboard and mouse events. Fix: https://github.com/Yamakaky/gyromouse/commit/55b26af9140d3ca10b730b1a7abaab7a7cc9d32b

ArjunNair commented 2 years ago

Thanks. I've pushed changes to check for window id across events.

Yamakaky commented 2 years ago

Sgtm!