Skip to content

Conversation

@catilac
Copy link
Collaborator

@catilac catilac commented Nov 20, 2025

Addresses #1305

I still need to add support for X11. But can do that in a later PR.

@catilac catilac requested a review from tychedelia November 20, 2025 15:01
Comment on lines +135 to +139
// TODO: Currently unsupported
return 0;
} else if (Platform.get() == Platform.WINDOWS) {
// TODO: Currently unsupported
return 0;
Copy link
Collaborator Author

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.

Comment on lines +141 to +142
// TODO: need to check if x11 or wayland
return GLFWNativeWayland.glfwGetWaylandDisplay();
Copy link
Collaborator Author

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.

Comment on lines -135 to +136
let window = AppKitWindowHandle::new(std::ptr::NonNull::new(ns_view_ptr).unwrap());
let window = AppKitWindowHandle::new(NonNull::new(ns_view_ptr).unwrap());
Copy link
Collaborator Author

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?

Comment on lines +185 to +189
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);
Copy link
Collaborator Author

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!~

@catilac catilac force-pushed the 1305-wayland-support branch from 511a147 to f84f52e Compare November 21, 2025 17:57
@catilac catilac mentioned this pull request Nov 24, 2025
@catilac
Copy link
Collaborator Author

catilac commented Nov 24, 2025

Closing this since the work has been moved to:
#1343
processing/libprocessing#3

@catilac catilac closed this Nov 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants