From 9df4a54308a88fd80c5774d91c62da35afb5fd1b Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Mon, 27 Jan 2020 17:02:13 -0500 Subject: [PATCH] Linux: Fix crashes on main window close (fixes issue #2831) Call DesktopWindowTreeHostPlatform::Close after destroying CEF's X11 window so that objects owned by the WindowTreeHost (Compositor, X11Window, etc) are properly cleaned up. --- libcef/browser/native/window_x11.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libcef/browser/native/window_x11.cc b/libcef/browser/native/window_x11.cc index ea61f1bf6..462ce420f 100644 --- a/libcef/browser/native/window_x11.cc +++ b/libcef/browser/native/window_x11.cc @@ -161,6 +161,10 @@ void CefWindowX11::Close() { ev.xclient.data.l[0] = gfx::GetAtom(kWMDeleteWindow); ev.xclient.data.l[1] = x11::CurrentTime; XSendEvent(xdisplay_, xwindow_, false, NoEventMask, &ev); + + auto host = GetHost(); + if (host) + host->Close(); } void CefWindowX11::Show() {