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

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

Issue 409223003: Revert of Simplify the logic in DesktopWindowTreeHostX11 for FocusOut (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | « ui/aura/window_tree_host_x11.cc ('k') | no next file » | 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 005f3468f45499300cfe89cf79be854ed6b4fc2a..a3fd31102a55a63104d7403ddb8716f5063fb56e 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
@@ -1595,8 +1595,13 @@
break;
}
case FocusOut:
- ReleaseCapture();
- X11DesktopHandler::get()->ProcessXEvent(xev);
+ if (xev->xfocus.mode != NotifyGrab) {
+ ReleaseCapture();
+ OnHostLostWindowCapture();
+ X11DesktopHandler::get()->ProcessXEvent(xev);
+ } else {
+ dispatcher()->OnHostLostMouseGrab();
+ }
break;
case FocusIn:
X11DesktopHandler::get()->ProcessXEvent(xev);
« no previous file with comments | « ui/aura/window_tree_host_x11.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698