fix(windows): remove native titlebar before first show
This commit is contained in:
1 parent
a2d243f333
commit
f83a5339c7
1 file changed
+8
-3
@@ -105,12 +105,17 @@ pub fn run() {
|
||||
#[cfg(target_os = "windows")]
|
||||
{
|
||||
use window_vibrancy::apply_mica;
|
||||
if let Err(e) = apply_mica(&main, None) {
|
||||
log::warn!("[main] mica failed: {e}");
|
||||
}
|
||||
// The window starts hidden so Windows native chrome can be disabled before
|
||||
// the first show; doing this after the native frame is visible is unreliable.
|
||||
if let Err(e) = main.set_decorations(false) {
|
||||
log::warn!("[main] disable native decorations failed: {e}");
|
||||
}
|
||||
if let Err(e) = apply_mica(&main, None) {
|
||||
log::warn!("[main] mica failed: {e}");
|
||||
}
|
||||
}
|
||||
if let Err(e) = main.show() {
|
||||
log::warn!("[main] initial show failed: {e}");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user