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

Unified Diff: components/exo/shell_surface.cc

Issue 2968593002: exo: Drop window on touch release (Closed)
Patch Set: Created 3 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
« no previous file with comments | « components/exo/shell_surface.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/exo/shell_surface.cc
diff --git a/components/exo/shell_surface.cc b/components/exo/shell_surface.cc
index 54dc84495602fc735497305e729600c5bf90d995..f719b368c470b2612fb71336d0b46b93c93bb95d 100644
--- a/components/exo/shell_surface.cc
+++ b/components/exo/shell_surface.cc
@@ -1125,6 +1125,26 @@ void ShellSurface::OnMouseEvent(ui::MouseEvent* event) {
}
}
+void ShellSurface::OnGestureEvent(ui::GestureEvent* event) {
+ if (!resizer_) {
+ views::View::OnGestureEvent(event);
+ return;
+ }
+
+ if (event->handled())
+ return;
+
+ switch (event->type()) {
+ case ui::ET_GESTURE_END: {
oshima 2017/06/29 22:52:34 if (type == ET_GESTURE_END) { ?
Dominik Laskowski 2017/06/30 17:45:44 XDG clients can't be dragged/resized using touch,
+ ScopedConfigure scoped_configure(this, false);
+ EndDrag(false /* revert */);
+ break;
+ }
+
+ default: break;
reveman 2017/06/30 19:50:15 nit: NOTREACHED() here and add other GESTURE event
Dominik Laskowski 2017/06/30 20:50:06 Checked the range instead to avoid 20+ cases.
+ }
+}
+
////////////////////////////////////////////////////////////////////////////////
// ui::AcceleratorTarget overrides:
« no previous file with comments | « components/exo/shell_surface.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698