Skip to content

Commit

Permalink
Make the current window not current while creating a new shared windo…
Browse files Browse the repository at this point in the history
…w in the glutin port
  • Loading branch information
Alan Jeffrey committed Sep 20, 2019
1 parent 5f503f0 commit 99699ea
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ports/glutin/headed_window.rs
Expand Up @@ -133,6 +133,11 @@ impl Window {
context.window().set_window_icon(Some(load_icon(icon_bytes)));
}

if let Some(sharing) = sharing {
debug!("Making window {:?} not current", sharing.gl_context.borrow().window().id());
sharing.gl_context.borrow_mut().make_not_current();
}

let context = unsafe {
debug!("Making window {:?} current", context.window().id());
context.make_current().expect("Couldn't make window current")
Expand Down

0 comments on commit 99699ea

Please sign in to comment.