HumbleUI / JWM

Cross-platform window management and OS integration library for Java
Apache License 2.0
547 stars 44 forks source link

X11: Copy windows for iteration #196

Closed dzaima closed 2 years ago

dzaima commented 2 years ago

Otherwise the EventFrame dispatch may close the item the for loop currently holds an iterator of, ending up in undefined behavior and segfaults.

Alternative would be to keep a vector of windows to remove in WindowManagerX11, and removing them all inside _processCallbacks after they've been iterated through.

tonsky commented 2 years ago

Thank you!