mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-02-16 20:20:51 +01:00
Linux: Fix client termination (issue #2268)
This commit is contained in:
parent
f60fdc6d87
commit
157ad1d57d
@ -314,6 +314,16 @@ uint32_t CefWindowX11::DispatchEvent(const ui::PlatformEvent& event) {
|
|||||||
if (!browser_ || browser_->TryCloseBrowser()) {
|
if (!browser_ || browser_->TryCloseBrowser()) {
|
||||||
// Allow the close.
|
// Allow the close.
|
||||||
XDestroyWindow(xdisplay_, xwindow_);
|
XDestroyWindow(xdisplay_, xwindow_);
|
||||||
|
|
||||||
|
xwindow_ = None;
|
||||||
|
|
||||||
|
if (browser_.get()) {
|
||||||
|
// Force the browser to be destroyed and release the reference
|
||||||
|
// added in PlatformCreateWindow().
|
||||||
|
browser_->WindowDestroyed();
|
||||||
|
}
|
||||||
|
|
||||||
|
delete this;
|
||||||
}
|
}
|
||||||
} else if (protocol == gfx::GetAtom(kNetWMPing)) {
|
} else if (protocol == gfx::GetAtom(kNetWMPing)) {
|
||||||
XEvent reply_event = *xev;
|
XEvent reply_event = *xev;
|
||||||
@ -327,17 +337,6 @@ uint32_t CefWindowX11::DispatchEvent(const ui::PlatformEvent& event) {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case DestroyNotify:
|
|
||||||
xwindow_ = None;
|
|
||||||
|
|
||||||
if (browser_.get()) {
|
|
||||||
// Force the browser to be destroyed and release the reference added
|
|
||||||
// in PlatformCreateWindow().
|
|
||||||
browser_->WindowDestroyed();
|
|
||||||
}
|
|
||||||
|
|
||||||
delete this;
|
|
||||||
break;
|
|
||||||
case FocusIn:
|
case FocusIn:
|
||||||
// This message is received first followed by a "_NET_ACTIVE_WINDOW"
|
// This message is received first followed by a "_NET_ACTIVE_WINDOW"
|
||||||
// message sent to the root window. When X11DesktopHandler handles the
|
// message sent to the root window. When X11DesktopHandler handles the
|
||||||
|
Loading…
x
Reference in New Issue
Block a user