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

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

Issue 214113003: Dispatches mouse movement messages in posted task to improve dragging smoothness (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Dispatches mouse movement messages in posted task to improve dragging smoothness (comments) Created 6 years, 9 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/x11_whole_screen_move_loop.h
diff --git a/ui/views/widget/desktop_aura/x11_whole_screen_move_loop.h b/ui/views/widget/desktop_aura/x11_whole_screen_move_loop.h
index 9fd51cb3bc820366a1f7f3d2dda3df255f1074c1..347771efba6008fbead956cbbe37affe4573c30f 100644
--- a/ui/views/widget/desktop_aura/x11_whole_screen_move_loop.h
+++ b/ui/views/widget/desktop_aura/x11_whole_screen_move_loop.h
@@ -7,6 +7,7 @@
#include "base/callback.h"
#include "base/compiler_specific.h"
+#include "base/memory/weak_ptr.h"
#include "base/message_loop/message_pump_dispatcher.h"
#include "ui/gfx/image/image_skia.h"
#include "ui/gfx/native_widget_types.h"
@@ -62,6 +63,9 @@ class X11WholeScreenMoveLoop : public base::MessagePumpDispatcher {
// (defined as having a pixel with alpha > 32). If so, return true.
bool CheckIfIconValid();
+ // Dispatch mouse movement event to |delegate_| in a posted task.
+ void DispatchMouseMovement();
+
X11WholeScreenMoveLoopDelegate* delegate_;
// Are we running a nested message loop from RunMoveLoop()?
@@ -81,6 +85,8 @@ class X11WholeScreenMoveLoop : public base::MessagePumpDispatcher {
scoped_ptr<Widget> drag_widget_;
gfx::ImageSkia drag_image_;
gfx::Vector2dF drag_offset_;
+ XMotionEvent last_xmotion_;
sadrul 2014/03/27 19:25:09 Hm. It's unfortunate that we need to keep the X ev
varkha 2014/03/27 21:00:54 Yes, but it avoids restricting what event fields t
+ base::WeakPtrFactory<X11WholeScreenMoveLoop> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(X11WholeScreenMoveLoop);
};

Powered by Google App Engine
This is Rietveld 408576698