mirror of
				https://bitbucket.org/chromiumembedded/cef
				synced 2025-06-05 21:39:12 +02:00 
			
		
		
		
	Mac: Remove duplicate focus change notification
This commit is contained in:
		@@ -92,18 +92,6 @@
 | 
			
		||||
  [super dealloc];
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Called when we are activated (when we gain focus).
 | 
			
		||||
- (void)windowDidBecomeKey:(NSNotification*)notification {
 | 
			
		||||
  if (browser_)
 | 
			
		||||
    browser_->SetFocus(true);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Called when we are deactivated (when we lose focus).
 | 
			
		||||
- (void)windowDidResignKey:(NSNotification*)notification {
 | 
			
		||||
  if (browser_)
 | 
			
		||||
    browser_->SetFocus(false);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
- (BOOL)windowShouldClose:(id)window {
 | 
			
		||||
  if (browser_ && !browser_->TryCloseBrowser()) {
 | 
			
		||||
    // Cancel the close.
 | 
			
		||||
 
 | 
			
		||||
@@ -60,10 +60,12 @@ void BrowserWindowStdMac::ShowPopup(ClientWindowHandle parent_handle,
 | 
			
		||||
 | 
			
		||||
void BrowserWindowStdMac::Show() {
 | 
			
		||||
  REQUIRE_MAIN_THREAD();
 | 
			
		||||
  // Nothing to do here. Chromium internally handles window show/hide.
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void BrowserWindowStdMac::Hide() {
 | 
			
		||||
  REQUIRE_MAIN_THREAD();
 | 
			
		||||
  // Nothing to do here. Chromium internally handles window show/hide.
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void BrowserWindowStdMac::SetBounds(int x, int y, size_t width, size_t height) {
 | 
			
		||||
@@ -73,9 +75,7 @@ void BrowserWindowStdMac::SetBounds(int x, int y, size_t width, size_t height) {
 | 
			
		||||
 | 
			
		||||
void BrowserWindowStdMac::SetFocus(bool focus) {
 | 
			
		||||
  REQUIRE_MAIN_THREAD();
 | 
			
		||||
 | 
			
		||||
  if (browser_)
 | 
			
		||||
    browser_->GetHost()->SetFocus(focus);
 | 
			
		||||
  // Nothing to do here. Chromium internally handles window focus assignment.
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
ClientWindowHandle BrowserWindowStdMac::GetWindowHandle() const {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user