summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWu-Cheng Li <wuchengli@chromium.org>2015-03-29 14:24:25 +0800
committerWu-Cheng Li <wuchengli@chromium.org>2015-03-29 06:26:20 +0000
commit5b1a0d0e78fed0e0ca6cfbffec656a53921f029c (patch)
tree8073b7e2134087c266095e7afc1db35457f23a04
parent212222e21d29143b5c9659e4b18625ddc9ec464c (diff)
downloadchromium_src-5b1a0d0e78fed0e0ca6cfbffec656a53921f029c.zip
chromium_src-5b1a0d0e78fed0e0ca6cfbffec656a53921f029c.tar.gz
chromium_src-5b1a0d0e78fed0e0ca6cfbffec656a53921f029c.tar.bz2
x11: Reset the window handle after destroying it
GLSurface::Destroy() could be called from outside the GLSurface implementation. Since it is also called in NativeViewGLSurfaceGLX's destructor, calling Destroy() twice will cause a BadWindow error. BUG=470004 TBR=piman@chromium.org,dnicoara@chromium.org Review URL: https://codereview.chromium.org/1034173004 Cr-Commit-Position: refs/heads/master@{#322494} (cherry picked from commit a7927193002ef9c5a79bd74582260acc9f1ef66d) Review URL: https://codereview.chromium.org/1043763002 Cr-Commit-Position: refs/branch-heads/2311@{#374} Cr-Branched-From: 09b7de5dd7254947cd4306de907274fa63373d48-refs/heads/master@{#317474}
-rw-r--r--ui/gl/gl_surface_glx.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/ui/gl/gl_surface_glx.cc b/ui/gl/gl_surface_glx.cc
index 5a3eafd..06d30f8 100644
--- a/ui/gl/gl_surface_glx.cc
+++ b/ui/gl/gl_surface_glx.cc
@@ -476,6 +476,7 @@ void NativeViewGLSurfaceGLX::Destroy() {
if (event_source)
event_source->RemovePlatformEventDispatcher(this);
XDestroyWindow(g_display, window_);
+ window_ = 0;
XFlush(g_display);
}
}