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.
This commit is contained in:
Marshall Greenblatt 2020-01-27 17:02:13 -05:00
parent 492c6c6843
commit 9df4a54308

View File

@ -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() {