Chromium Code Reviews| Index: ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc |
| diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc |
| index 7ceac3af3ee7c0f72158cef9c249c744c9008376..92dc54ee3a60b78708a6c4cae8b212edb38b11af 100644 |
| --- a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc |
| +++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc |
| @@ -205,6 +205,8 @@ void DesktopWindowTreeHostX11::HandleNativeWidgetActivationChanged( |
| OnHostActivated(); |
| open_windows().remove(xwindow_); |
| open_windows().insert(open_windows().begin(), xwindow_); |
| + } else { |
| + ReleaseCapture(); |
| } |
| desktop_native_widget_aura_->HandleActivationChanged(active); |
| @@ -313,7 +315,7 @@ void DesktopWindowTreeHostX11::CloseNow() { |
| if (xwindow_ == None) |
| return; |
| - x11_capture_.reset(); |
| + ReleaseCapture(); |
| native_widget_delegate_->OnNativeWidgetDestroying(); |
| // If we have children, close them. Use a copy for iteration because they'll |
| @@ -510,7 +512,7 @@ void DesktopWindowTreeHostX11::Deactivate() { |
| if (!IsActive()) |
| return; |
| - x11_capture_.reset(); |
| + ReleaseCapture(); |
| X11DesktopHandler::get()->DeactivateWindow(xwindow_); |
| } |
| @@ -532,7 +534,7 @@ void DesktopWindowTreeHostX11::Maximize() { |
| } |
| void DesktopWindowTreeHostX11::Minimize() { |
| - x11_capture_.reset(); |
| + ReleaseCapture(); |
| XIconifyWindow(xdisplay_, xwindow_, 0); |
| } |
| @@ -821,10 +823,8 @@ void DesktopWindowTreeHostX11::OnNativeWidgetFocus() { |
| } |
| void DesktopWindowTreeHostX11::OnNativeWidgetBlur() { |
| - if (xwindow_) { |
| - x11_capture_.reset(); |
|
sadrul
2014/07/14 16:58:00
Can you explain this change?
pkotwicz
2014/07/14 18:25:20
This line in particular made it pointless to grab
|
| + if (xwindow_) |
| native_widget_delegate_->AsWidget()->GetInputMethod()->OnBlur(); |
| - } |
| } |
| bool DesktopWindowTreeHostX11::IsAnimatingClosed() const { |