Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set wrench's window title before the event loop starts. #2919

Merged
merged 1 commit into from Aug 10, 2018
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Set wrench's window title before the event loop starts.

  • Loading branch information
nical committed Jul 20, 2018
commit 5352f7ae620ca370cda06654a0730f686454f4d2
@@ -489,6 +489,12 @@ fn main() {
notifier,
);

if let Some(window_title) = wrench.take_title() {
if !cfg!(windows) {
window.set_title(&window_title);
}
}

if let Some(subargs) = args.subcommand_matches("show") {
render(&mut wrench, &mut window, size, &mut events_loop, subargs);
} else if let Some(subargs) = args.subcommand_matches("png") {
@@ -567,12 +573,6 @@ fn render<'a>(
thing.do_frame(wrench);

let mut body = |wrench: &mut Wrench, global_event: winit::Event| {
if let Some(window_title) = wrench.take_title() {
if !cfg!(windows) { //TODO: calling `set_title` from inside the `run_forever` loop is illegal...
window.set_title(&window_title);
}
}

let mut do_frame = false;
let mut do_render = false;

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.