mirror of
				https://bitbucket.org/chromiumembedded/cef
				synced 2025-06-05 21:39:12 +02:00 
			
		
		
		
	Linux: Fix client termination (issue #2268)
This commit is contained in:
		@@ -314,6 +314,16 @@ uint32_t CefWindowX11::DispatchEvent(const ui::PlatformEvent& event) {
 | 
			
		||||
          if (!browser_ || browser_->TryCloseBrowser()) {
 | 
			
		||||
            // Allow the close.
 | 
			
		||||
            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)) {
 | 
			
		||||
          XEvent reply_event = *xev;
 | 
			
		||||
@@ -327,17 +337,6 @@ uint32_t CefWindowX11::DispatchEvent(const ui::PlatformEvent& event) {
 | 
			
		||||
      }
 | 
			
		||||
      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:
 | 
			
		||||
      // This message is received first followed by a "_NET_ACTIVE_WINDOW"
 | 
			
		||||
      // message sent to the root window. When X11DesktopHandler handles the
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user