Skip to content

Commit

Permalink
Remove window::change_title since it's redundant
Browse files Browse the repository at this point in the history
Applications can change title declaratively.
  • Loading branch information
hecrj committed Jan 6, 2025
1 parent 00b60d8 commit 91fd6d3
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
8 changes: 0 additions & 8 deletions runtime/src/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,6 @@ pub enum Action {
/// Get the current [`Mode`] of the window.
GetMode(Id, oneshot::Sender<Mode>),

/// Change the title of the window.
ChangeTitle(Id, String),

/// Toggle the window to maximized or back
ToggleMaximize(Id),

Expand Down Expand Up @@ -388,11 +385,6 @@ pub fn change_level<T>(id: Id, level: Level) -> Task<T> {
task::effect(crate::Action::Window(Action::ChangeLevel(id, level)))
}

/// Changes the title of the window.
pub fn change_title<T>(id: Id, title: String) -> Task<T> {
task::effect(crate::Action::Window(Action::ChangeTitle(id, title)))
}

/// Set the inner maximum size of the window.
pub fn set_max_size<T>(id: Id, size: Option<Size>) -> Task<T> {
task::effect(crate::Action::Window(Action::SetMaxSize(id, size)))
Expand Down
5 changes: 0 additions & 5 deletions winit/src/program.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1321,11 +1321,6 @@ fn run_action<P, C>(
}));
}
}
window::Action::ChangeTitle(id, title) => {
if let Some(window) = window_manager.get_mut(id) {
window.raw.set_title(&title);
}
}
window::Action::SetResizable(id, resizable) => {
if let Some(window) = window_manager.get_mut(id) {
window.raw.set_resizable(resizable);
Expand Down

0 comments on commit 91fd6d3

Please sign in to comment.