glfw-rs icon indicating copy to clipboard operation
glfw-rs copied to clipboard

Window resize blocks events polling on macos

Open gliheng opened this issue 6 years ago • 1 comments

When window is resized on macos, event polling api is blocked. According to this https://github.com/glfw/glfw/issues/408, it may be solved by redraw inside window refresh callback, when window is resizing. But I cannot pull it off the event loop, with a loop like this

while !window.should_close() {
    glfw.wait_events_timeout(1.0/60.0);

    for (_, event) in glfw::flush_messages(&events) {
        handle_window_event(window, event);
    }
}

Since it's blocked on wait_events or poll_events, callbacks are processed by this eventloop.

gliheng avatar Dec 15 '18 14:12 gliheng

This doesn’t seem to be macOS-exclusive. It also seems to be the case on Windows.

CenTdemeern1 avatar Sep 05 '23 00:09 CenTdemeern1