-
-
Notifications
You must be signed in to change notification settings - Fork 106
wayland support #1337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wayland support #1337
Conversation
| // TODO: Currently unsupported | ||
| return 0; | ||
| } else if (Platform.get() == Platform.WINDOWS) { | ||
| // TODO: Currently unsupported | ||
| return 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wasn't sure what to do here since we don't use display handle on MacOS and windows yet.
| // TODO: need to check if x11 or wayland | ||
| return GLFWNativeWayland.glfwGetWaylandDisplay(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think i'll add x11 to this if we can test in the short term. otherwise it could go in another PR.
but happy to just do it here as well. i think i just have to check for a null pointer for Wayland or X11.
| let window = AppKitWindowHandle::new(std::ptr::NonNull::new(ns_view_ptr).unwrap()); | ||
| let window = AppKitWindowHandle::new(NonNull::new(ns_view_ptr).unwrap()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tychedelia from a rust stylistic point of view, do we like removing namespacing? or better to keep it in the context of a larger program?
| let window_handle_ptr = unsafe { NonNull::new_unchecked(window_handle as *mut c_void) }; | ||
| let window = WaylandWindowHandle::new(window_handle_ptr); | ||
|
|
||
| let display_handle_ptr = unsafe { NonNull::new_unchecked(display_handle as *mut c_void) }; | ||
| let display = WaylandDisplayHandle::new(display_handle_ptr); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I should add a TODO here for X11 as well. But happy I figured out how to do this!~
511a147 to
f84f52e
Compare
|
Closing this since the work has been moved to: |
Addresses #1305
I still need to add support for X11. But can do that in a later PR.