mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-02-24 16:07:42 +01:00
Linux: Fix BadWindow error when creating popup windows (issue #1717).
This commit is contained in:
parent
16f8a66040
commit
fdf3088470
@ -48,8 +48,10 @@ void BrowserWindow::OnBrowserClosing(CefRefPtr<CefBrowser> browser) {
|
||||
|
||||
void BrowserWindow::OnBrowserClosed(CefRefPtr<CefBrowser> browser) {
|
||||
REQUIRE_MAIN_THREAD();
|
||||
DCHECK_EQ(browser->GetIdentifier(), browser_->GetIdentifier());
|
||||
browser_ = NULL;
|
||||
if (browser_.get()) {
|
||||
DCHECK_EQ(browser->GetIdentifier(), browser_->GetIdentifier());
|
||||
browser_ = NULL;
|
||||
}
|
||||
|
||||
client_handler_->DetachDelegate();
|
||||
client_handler_ = NULL;
|
||||
|
@ -88,11 +88,6 @@ int RunMain(int argc, char* argv[]) {
|
||||
// Populate the settings based on command line arguments.
|
||||
context->PopulateSettings(&settings);
|
||||
|
||||
// Install xlib error handlers so that the application won't be terminated
|
||||
// on non-fatal errors.
|
||||
XSetErrorHandler(XErrorHandlerImpl);
|
||||
XSetIOErrorHandler(XIOErrorHandlerImpl);
|
||||
|
||||
// Create the main message loop object.
|
||||
scoped_ptr<MainMessageLoop> message_loop(new MainMessageLoopStd);
|
||||
|
||||
@ -106,6 +101,11 @@ int RunMain(int argc, char* argv[]) {
|
||||
// Perform gtkglext initialization required by the OSR example.
|
||||
gtk_gl_init(&argc, &argv_copy);
|
||||
|
||||
// Install xlib error handlers so that the application won't be terminated
|
||||
// on non-fatal errors. Must be done after initializing GTK.
|
||||
XSetErrorHandler(XErrorHandlerImpl);
|
||||
XSetIOErrorHandler(XIOErrorHandlerImpl);
|
||||
|
||||
// Install a signal handler so we clean up after ourselves.
|
||||
signal(SIGINT, TerminationSignalHandler);
|
||||
signal(SIGTERM, TerminationSignalHandler);
|
||||
|
Loading…
x
Reference in New Issue
Block a user