Skip to content

Make corner mode work on GNOME#6

Open
Aelerinya wants to merge 1 commit into
ddorn:mainfrom
Aelerinya:lucie/corner-mode-gnome
Open

Make corner mode work on GNOME#6
Aelerinya wants to merge 1 commit into
ddorn:mainfrom
Aelerinya:lucie/corner-mode-gnome

Conversation

@Aelerinya
Copy link
Copy Markdown
Contributor

No description provided.

Comment thread src-tauri/src/lib.rs
Comment on lines +146 to +160
// On Linux, disable Tauri's client-side decorations before the window is shown.
// On GNOME/Wayland the xdg-decoration protocol negotiates decoration mode at
// window-map time, so this must happen here — dynamic setDecorations() calls on
// a visible window are silently ignored by the compositor.
// On other Linux WMs (Sway, KDE, XFCE, i3…) the WM adds its own server-side
// decorations when it sees an undecorated window, so users still get a title bar.
#[cfg(target_os = "linux")]
{
if let Some(window) = app.get_webview_window("main") {
if let Err(e) = window.set_decorations(false) {
log::warn!("Failed to disable window decorations on Linux: {}", e);
}
}
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should change it to be a setting. GNOME window decorations are too big for corner mode to look good, but they're ok on Sway.

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.

1 participant