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

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: Created 6 years, 6 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
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 {
« no previous file with comments | « no previous file | ui/views/widget/widget_interactive_uitest.cc » ('j') | ui/views/widget/widget_interactive_uitest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698