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

Side by Side Diff: ui/views/widget/desktop_aura/x11_move_loop.h

Issue 749063003: Fix grabbing capture when the mouse is pressed on Desktop Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_X11_MOVE_LOOP_H_ 5 #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_X11_MOVE_LOOP_H_
6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_X11_MOVE_LOOP_H_ 6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_X11_MOVE_LOOP_H_
7 7
8 #include "ui/gfx/native_widget_types.h" 8 #include "ui/gfx/native_widget_types.h"
9 #include "ui/gfx/x/x11_types.h" 9 #include "ui/gfx/x/x11_types.h"
10 10
11 namespace views { 11 namespace views {
12 12
13 // Runs a nested message loop and grabs the mouse. This is used to implement 13 // Runs a nested message loop and grabs the mouse. This is used to implement
14 // dragging. 14 // dragging.
15 class X11MoveLoop { 15 class X11MoveLoop {
16 public: 16 public:
17 virtual ~X11MoveLoop() {} 17 virtual ~X11MoveLoop() {}
18 18
19 // Runs the nested message loop. While the mouse is grabbed, use |cursor| as 19 // Runs the nested message loop. Returns true if the move-loop is completed
20 // the mouse cursor. Returns true if the move-loop is completed successfully. 20 // successfully. If the pointer-grab fails, or the move-loop is canceled by
21 // If the pointer-grab fails, or the move-loop is canceled by the user (e.g. 21 // the user (e.g. by pressing escape), then returns false.
22 // by pressing escape), then returns false. 22 virtual bool RunMoveLoop(aura::Window* window) = 0;
sadrul 2014/12/22 21:46:36 Would it be possible to split this part of the cha
23 virtual bool RunMoveLoop(aura::Window* window, gfx::NativeCursor cursor) = 0;
24 23
25 // Updates the cursor while the move loop is running. 24 // Updates the cursor while the move loop is running.
26 virtual void UpdateCursor(gfx::NativeCursor cursor) = 0; 25 virtual void UpdateCursor(gfx::NativeCursor cursor) = 0;
27 26
28 // Ends the move loop that's currently in progress. 27 // Ends the move loop that's currently in progress.
29 virtual void EndMoveLoop() = 0; 28 virtual void EndMoveLoop() = 0;
30 }; 29 };
31 30
32 } // namespace views 31 } // namespace views
33 32
34 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_X11_MOVE_LOOP_H_ 33 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_X11_MOVE_LOOP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698