gpui: Add Wayland support (#7664)
This PR adds Wayland support to gpui using [wayland-rs](https://github.com/Smithay/wayland-rs). It is based on [#7598](https://github.com/zed-industries/zed/pull/7598). It detects Wayland support at runtime by checking the existence of the `WAYLAND_DISPLAY` environment variable. If it does not exist or is empty, the X11 backend will be used. To use the X11 backend in a Wayland session (for development purposes), you just need to unset WAYLAND_DISPLAY (`WAYLAND_DISPLAY= cargo run ...`). At the moment it only creates the window and renders the initial content provided by `BladeRenderer`, so it can run "Hello world" example.  Todo: - [x] Add basic Wayland support. - [x] Add window resizing. - [x] Add window closing. - [x] Add window updating. - [ ] Implement input handling, fractional scaling, and support other Wayland protocols. - [ ] Implement all unimplemented todo!(linux). - [ ] Add window decorations or use custom decorations (like on MacOS). - [ ] Address other missing functionality. Release Notes: - N/A --------- Co-authored-by: gabydd <gabydinnerdavid@gmail.com> Co-authored-by: Mikayla Maki <mikayla@zed.dev>
This commit is contained in:
co-authored by
gabydd
Mikayla Maki
parent
6e6ae0ef21
commit
f62baeda64
@@ -1,3 +1,6 @@
|
||||
//todo!(linux): remove this
|
||||
#![allow(unused_variables)]
|
||||
|
||||
mod blade_atlas;
|
||||
mod blade_belt;
|
||||
mod blade_renderer;
|
||||
@@ -6,6 +9,7 @@ mod client_dispatcher;
|
||||
mod dispatcher;
|
||||
mod platform;
|
||||
mod text_system;
|
||||
mod wayland;
|
||||
mod x11;
|
||||
|
||||
pub(crate) use blade_atlas::*;
|
||||
|
||||
Reference in New Issue
Block a user