rust-windowing/raw-window-handle

Should X display/connection handles be nullable?

madsmtm opened this issue · 4 comments

XlibDisplayHandle.display and XcbDisplayHandle.connection are nullable; should they be?

Previously discussed in #136.

If I remember correctly, display handles can be null for EGL. I've changed my mind since my posts in #136, I think allowing this use case is worth it.

Yes, there's a thing called EGL_DEFAULT_DISPLAY, so it'll use the display somehow automatically. Also it does open connection under the hood with xcb iirc the mesa code.

Whether null is correct depends on the context. Like kchibisov, for EGL it is valid. Meanwhile in Vulkan, you must provide a valid pointer to a display.