mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-25 02:58:12 +08:00
Desktop: Enable window resize controls on Wayland compositors (#3183)
wayland client side decorations
This commit is contained in:
+1
-1
@@ -26,7 +26,7 @@ graphite-desktop-wrapper = { path = "wrapper" }
|
||||
graphite-desktop-embedded-resources = { path = "embedded-resources", optional = true }
|
||||
|
||||
wgpu = { workspace = true }
|
||||
winit = { workspace = true, features = [ "serde" ] }
|
||||
winit = { workspace = true, features = [ "wayland-csd-adwaita-notitlebar", "serde" ] }
|
||||
thiserror = { workspace = true }
|
||||
futures = { workspace = true }
|
||||
cef = { workspace = true }
|
||||
|
||||
@@ -24,7 +24,8 @@ impl NativeWindowHandle {
|
||||
.with_title(APP_NAME)
|
||||
.with_min_surface_size(winit::dpi::LogicalSize::new(400, 300))
|
||||
.with_surface_size(winit::dpi::LogicalSize::new(1200, 800))
|
||||
.with_resizable(true);
|
||||
.with_resizable(true)
|
||||
.with_theme(Some(winit::window::Theme::Dark));
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
{
|
||||
@@ -33,7 +34,7 @@ impl NativeWindowHandle {
|
||||
use winit::platform::wayland::WindowAttributesWayland;
|
||||
use winit::platform::x11::WindowAttributesX11;
|
||||
window = if event_loop.is_wayland() {
|
||||
let wayland_window = WindowAttributesWayland::default().with_name(APP_ID, "");
|
||||
let wayland_window = WindowAttributesWayland::default().with_name(APP_ID, "").with_prefer_csd(true);
|
||||
window.with_platform_attributes(Box::new(wayland_window))
|
||||
} else {
|
||||
let x11_window = WindowAttributesX11::default().with_name(APP_ID, APP_NAME);
|
||||
|
||||
Reference in New Issue
Block a user