On Wayland, fix Window::is_decorated with CSD

This commit is contained in:
Venceslas Duet 2023-07-18 13:57:33 +02:00 committed by GitHub
parent b166e1ff13
commit 89aa7cc06e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -52,6 +52,8 @@ fn main() {
} => { } => {
if let Some(dir) = cursor_location { if let Some(dir) = cursor_location {
let _res = window.drag_resize_window(dir); let _res = window.drag_resize_window(dir);
} else if !window.is_decorated() {
let _res = window.drag_window();
} }
} }
WindowEvent::KeyboardInput { WindowEvent::KeyboardInput {

View file

@ -384,7 +384,7 @@ impl WindowState {
.map(|configure| configure.decoration_mode == DecorationMode::Client) .map(|configure| configure.decoration_mode == DecorationMode::Client)
.unwrap_or(false); .unwrap_or(false);
if let Some(frame) = csd.then_some(self.frame.as_ref()).flatten() { if let Some(frame) = csd.then_some(self.frame.as_ref()).flatten() {
frame.is_hidden() !frame.is_hidden()
} else { } else {
// Server side decorations. // Server side decorations.
true true