Skip to content

Commit

Permalink
Don't completely trust servo's tracking of the GL context in glutin
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan Jeffrey committed Sep 20, 2019
1 parent a7ed8f7 commit 5f503f0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ports/glutin/context.rs
Expand Up @@ -35,6 +35,13 @@ impl GlContext {
*self = match std::mem::replace(self, GlContext::None) {
GlContext::Current(c) => {
warn!("Making an already current context current");
// Servo thinks that that this window is current,
// but it might be wrong, since other code may have
// changed the current GL context. Just to be on
// the safe side, we make it current anyway.
let c = unsafe {
c.make_current().expect("Couldn't make window current")
};
GlContext::Current(c)
},
GlContext::NotCurrent(c) => {
Expand Down

0 comments on commit 5f503f0

Please sign in to comment.