- Electron version: 1.2.2
- Operating system: Linux

This is a problem only in linux. It works in OSX.

``` javascript
win.hide()
win.capturePage(function(img){
 // never called
})
```

shell/browser/api/electron_api_web_contents.cc
Emit("close");
  auto* autofill_driver_factory =
      AutofillDriverFactory::FromWebContents(ontents());
  if (autofill_driver_factory) {
    autofill_driver_factory->CloseAllPopups();
  }
  for (ExtendedWebContentsObserver& observer : observers_)
    observer.OnCloseContents();
}
void WebContents::ActivateContents(content::WebContents* source) {
  for (ExtendedWebContentsObserver& observer : observers_)
    observer.OnActivateContents();
}
void WebContents::UpdateTargetURL(content::WebContents* source,
                                  const GURL& url) {
  Emit("update-target-url", url);
}
bool WebContents::HandleKeyboardEvent(
    content::WebContents* source,
    const content::NativeWebKeyboardEvent& event) {
  if (type_ == Type::kWebView && embedder_) {
    
    return embedder_->HandleKeyboardEvent(source, event);
  } else {
    return PlatformHandleKeyboardEvent(source, event);
  }
}
#if !defined(OS_MAC)
bool WebContents::PlatformHandleKeyboardEvent(