Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(595)

Unified Diff: ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc

Issue 334933008: Enable setting capture to a non-toplevel widget when the widget is activated on Linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix test on CrOS Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/views/widget/widget_interactive_uitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 f9c22a6f574f78feb757fd79c4a82c343026854b..5b6655bff1c910d881bccb1cb3e63132323c4a89 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
@@ -203,6 +203,8 @@ void DesktopWindowTreeHostX11::HandleNativeWidgetActivationChanged(
OnHostActivated();
open_windows().remove(xwindow_);
open_windows().insert(open_windows().begin(), xwindow_);
+ } else {
+ ReleaseCapture();
}
desktop_native_widget_aura_->HandleActivationChanged(active);
@@ -311,7 +313,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
@@ -508,7 +510,7 @@ void DesktopWindowTreeHostX11::Deactivate() {
if (!IsActive())
return;
- x11_capture_.reset();
+ ReleaseCapture();
X11DesktopHandler::get()->DeactivateWindow(xwindow_);
}
@@ -530,7 +532,7 @@ void DesktopWindowTreeHostX11::Maximize() {
}
void DesktopWindowTreeHostX11::Minimize() {
- x11_capture_.reset();
+ ReleaseCapture();
XIconifyWindow(xdisplay_, xwindow_, 0);
}
@@ -819,10 +821,8 @@ void DesktopWindowTreeHostX11::OnNativeWidgetFocus() {
}
void DesktopWindowTreeHostX11::OnNativeWidgetBlur() {
- if (xwindow_) {
- x11_capture_.reset();
+ if (xwindow_)
native_widget_delegate_->AsWidget()->GetInputMethod()->OnBlur();
- }
}
bool DesktopWindowTreeHostX11::IsAnimatingClosed() const {
« no previous file with comments | « no previous file | ui/views/widget/widget_interactive_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698