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

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

Issue 265843004: Avoids releasing capture in EndMoveLoop if capture was switched to another window while dragging (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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/views/widget/desktop_aura/desktop_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/x11_whole_screen_move_loop.cc
diff --git a/ui/views/widget/desktop_aura/x11_whole_screen_move_loop.cc b/ui/views/widget/desktop_aura/x11_whole_screen_move_loop.cc
index fa9b75f4efeb59889512169274bc7b9fbe6fb76d..cf10714173809145c4211694fd320ef9e226cd36 100644
--- a/ui/views/widget/desktop_aura/x11_whole_screen_move_loop.cc
+++ b/ui/views/widget/desktop_aura/x11_whole_screen_move_loop.cc
@@ -25,6 +25,7 @@
#include "ui/gfx/point_conversions.h"
#include "ui/gfx/screen.h"
#include "ui/views/controls/image_view.h"
+#include "ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h"
#include "ui/views/widget/widget.h"
namespace views {
@@ -253,7 +254,9 @@ void X11WholeScreenMoveLoop::EndMoveLoop() {
// Ungrab before we let go of the window.
XDisplay* display = gfx::GetXDisplay();
- XUngrabPointer(display, CurrentTime);
+ // Only ungrab pointer if capture was not switched to another window.
+ if (!DesktopWindowTreeHostX11::AnyHostHasCapture())
+ XUngrabPointer(display, CurrentTime);
XUngrabKeyboard(display, CurrentTime);
sadrul 2014/05/05 19:43:33 I assume we wouldn't want to do this either?
varkha 2014/05/06 22:22:12 Since we still grab the keyboard in this class we
sadrul 2014/05/07 14:10:46 I meant perhaps we don't want to ungrab the keyboa
varkha 2014/05/07 20:17:54 Done.
// Restore the previous dispatcher.
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698