Skip to content

A lightweight, macOS-style dock for Windows 11, with glass visuals, smooth magnification, and Genie effect.

Merge branch 'main' into feat/notifications-and-window-controls

Cristian Olivera Chávez1a133fbb927a
diff --cc apps/dock/src/app.rs
index 50dae90,571ee02..265ef05
--- a/apps/dock/src/app.rs
+++ b/apps/dock/src/app.rs
@@@ -3982,22 -4115,14 +4115,22 @@@ impl App
self.start_bounce(app_id.clone(), Some(ATTENTION_HOPS * bounce::HOP_SECONDS));
}
if changed {
- self.sync_attention_visuals()?;
+ self.sync_badge_visuals()?;
self.render()?;
}
- if self.config.notification_badges && !self.config.muted_apps.contains(&app_id) {
+ if (self.config.notification_badges || self.config.notifications)
+ && !self.config.muted_apps.contains(&app_id)
+ {
let title = tracker::title(hwnd);
- self.notifications.push(
+ let app_name = muelle_shell::names::display_name(&app_id);
+ let app_name = if app_name.is_empty() {
+ title.clone()
+ } else {
+ app_name
+ };
+ let pushed = self.notifications.push(
app_id.clone(),
- title.clone(),
+ app_name,
title,
String::new(),
None,
@@@ -4084,11 -4169,41 +4217,11 @@@
}
if self.config.notification_badges {
- let _ = self.render();
+ let _ = self.sync_badge_visuals().and_then(|()| self.render());
}
- if pushed.is_some() && !self.fullscreen {
- let pos = match self.config.notification_position {
- muelle_config::NotificationPosition::TopRight => {
- muelle_core::notifications::BannerPosition::TopRight
- }
- muelle_config::NotificationPosition::BottomRight => {
- muelle_core::notifications::BannerPosition::BottomRight
- }
- };
- let work_area = primary_monitor().map_or(
- Rect {
- x: 0.0,
- y: 0.0,
- width: 1920.0,
- height: 1080.0,
- },
- |m| Rect {
- x: m.screen.left as f32,
- y: m.screen.top as f32,
- width: (m.screen.right - m.screen.left) as f32,
- height: (m.screen.bottom - m.screen.top) as f32,
- },
- );
- let scale = self.dock_monitor().map_or(1.0, |m| m.scale);
- let theme = Theme::for_system(uses_light_theme(), transparency_enabled());
- let _ = notification_banner::NotificationBannerView::ensure_or_create(
- &self.gfx, pos, work_area, scale, theme,
- );
- let _ = notification_banner::NotificationBannerView::sync_queue(
- &self.gfx,
- &self.notifications,
- );
+ if pushed.is_some() {
+ self.show_active_banners();
}
}