wayland: Move initialization to the Rust side
This will help make the init procedure safer, by limiting the number of Rust objects that need to be carried to the C side and may be mangled on the way there. The second benefit is that it allows outputs to become part of new state management.
This commit is contained in:
@ -4,6 +4,12 @@
|
||||
|
||||
struct squeek_wayland *squeek_wayland = NULL;
|
||||
|
||||
void squeek_wayland_init_global(struct squeek_outputs *outputs) {
|
||||
struct squeek_wayland *wayland = {0};
|
||||
wayland->outputs = outputs;
|
||||
squeek_wayland = wayland;
|
||||
}
|
||||
|
||||
// The following functions only exist
|
||||
// to create linkable symbols out of inline functions,
|
||||
// because those are not directly callable from Rust
|
||||
|
||||
Reference in New Issue
Block a user