Skip to content

Commit 9ae4b4e

Browse files
committed
Silence layer-shell toolbar notice
1 parent 3210da6 commit 9ae4b4e

File tree

3 files changed

+1
-23
lines changed

3 files changed

+1
-23
lines changed

src/backend/wayland/state.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ use crate::{
5151
},
5252
config::{Action, ColorSpec, Config},
5353
input::{BoardMode, DrawingState, EraserMode, InputState, Tool, ZoomAction},
54-
notification,
5554
session::SessionOptions,
5655
ui::toolbar::{ToolbarBindingHints, ToolbarEvent, ToolbarSnapshot},
5756
};

src/backend/wayland/state/data.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ pub struct StateData {
4040
Option<smithay_client_toolkit::shell::wlr_layer::KeyboardInteractivity>,
4141
pub(super) toolbar_needs_recreate: bool,
4242
pub(super) toolbar_layer_shell_missing_logged: bool,
43-
pub(super) toolbar_layer_shell_notice_sent: bool,
4443
pub(super) inline_toolbars: bool,
4544
pub(super) inline_top_hits: Vec<HitRegion>,
4645
pub(super) inline_side_hits: Vec<HitRegion>,
@@ -87,7 +86,6 @@ impl StateData {
8786
current_keyboard_interactivity: None,
8887
toolbar_needs_recreate: true,
8988
toolbar_layer_shell_missing_logged: false,
90-
toolbar_layer_shell_notice_sent: false,
9189
inline_toolbars: false,
9290
inline_top_hits: Vec::new(),
9391
inline_side_hits: Vec::new(),

src/backend/wayland/state/toolbar/visibility/sync.rs

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,32 +17,14 @@ impl WaylandState {
1717

1818
let desktop_env = std::env::var("XDG_CURRENT_DESKTOP").unwrap_or_else(|_| "unknown".into());
1919
let session_env = std::env::var("XDG_SESSION_DESKTOP").unwrap_or_else(|_| "unknown".into());
20-
log::warn!(
20+
log::info!(
2121
"Layer-shell protocol unavailable; toolbar surfaces will not appear (desktop='{}', session='{}'). Overlay may be limited to the work area on compositors like GNOME.",
2222
desktop_env,
2323
session_env
2424
);
2525
self.data.toolbar_layer_shell_missing_logged = true;
2626
}
2727

28-
fn notify_toolbar_layer_shell_missing_once(&mut self) {
29-
if self.data.toolbar_layer_shell_notice_sent {
30-
return;
31-
}
32-
33-
self.data.toolbar_layer_shell_notice_sent = true;
34-
let summary = "Toolbars unavailable on this desktop";
35-
let body = "This compositor does not expose the layer-shell protocol, so the toolbar surfaces cannot be created. Try a compositor with layer-shell support or an X11 session.";
36-
notification::send_notification_async(
37-
&self.tokio_handle,
38-
summary.to_string(),
39-
body.to_string(),
40-
Some("dialog-warning".to_string()),
41-
);
42-
log::warn!("{}", summary);
43-
log::warn!("{}", body);
44-
}
45-
4628
/// Applies keyboard interactivity based on toolbar visibility.
4729
pub(in crate::backend::wayland) fn refresh_keyboard_interactivity(&mut self) {
4830
let desired = self.desired_keyboard_interactivity();
@@ -122,7 +104,6 @@ impl WaylandState {
122104
// Warn the user when layer-shell is unavailable and we're forced to inline fallback.
123105
if any_visible && self.layer_shell.is_none() {
124106
self.log_toolbar_layer_shell_missing_once();
125-
self.notify_toolbar_layer_shell_missing_once();
126107
}
127108

128109
if any_visible && inline_active {

0 commit comments

Comments
 (0)