raw-window-handle
raw-window-handle copied to clipboard
Should X display/connection handles be nullable?
XlibDisplayHandle.display and XcbDisplayHandle.connection are nullable; should they be?
Previously discussed in https://github.com/rust-windowing/raw-window-handle/pull/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.
Closing now, as I think this question was answered.