Commit 58526a4b authored by Maksim Sisov's avatar Maksim Sisov Committed by Commit Bot

X11WholeScreenMoveLoop: remove code that emulates button press.

Actually, I couldn't find the real use of this code. It seems like
all the windows we create are aura Windows and this condition
never executes.

Bug: 1069469
Change-Id: Ic3caebca38769e45b873cbc15f1ef618232be390
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2144054
Commit-Queue: Maksim Sisov <msisov@igalia.com>
Reviewed-by: default avatarThomas Anderson <thomasanderson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#758155}
parent 43510d3d
...@@ -50,7 +50,6 @@ X11WholeScreenMoveLoop::X11WholeScreenMoveLoop(X11MoveLoopDelegate* delegate) ...@@ -50,7 +50,6 @@ X11WholeScreenMoveLoop::X11WholeScreenMoveLoop(X11MoveLoopDelegate* delegate)
: delegate_(delegate), : delegate_(delegate),
in_move_loop_(false), in_move_loop_(false),
initial_cursor_(ui::mojom::CursorType::kNull), initial_cursor_(ui::mojom::CursorType::kNull),
should_reset_mouse_flags_(false),
grab_input_window_(x11::None), grab_input_window_(x11::None),
grabbed_pointer_(false), grabbed_pointer_(false),
canceled_(false) {} canceled_(false) {}
...@@ -165,15 +164,6 @@ bool X11WholeScreenMoveLoop::RunMoveLoop(aura::Window* source, ...@@ -165,15 +164,6 @@ bool X11WholeScreenMoveLoop::RunMoveLoop(aura::Window* source,
nested_dispatcher_ = nested_dispatcher_ =
ui::PlatformEventSource::GetInstance()->OverrideDispatcher(this); ui::PlatformEventSource::GetInstance()->OverrideDispatcher(this);
// We are handling a mouse drag outside of the aura::Window system. We must
// manually make aura think that the mouse button is pressed so that we don't
// draw extraneous tooltips.
aura::Env* env = aura::Env::GetInstance();
if (!env->IsMouseButtonDown()) {
env->set_mouse_button_flags(ui::EF_LEFT_MOUSE_BUTTON);
should_reset_mouse_flags_ = true;
}
base::WeakPtr<X11WholeScreenMoveLoop> alive(weak_factory_.GetWeakPtr()); base::WeakPtr<X11WholeScreenMoveLoop> alive(weak_factory_.GetWeakPtr());
in_move_loop_ = true; in_move_loop_ = true;
...@@ -201,12 +191,6 @@ void X11WholeScreenMoveLoop::EndMoveLoop() { ...@@ -201,12 +191,6 @@ void X11WholeScreenMoveLoop::EndMoveLoop() {
// Prevent DispatchMouseMovement from dispatching any posted motion event. // Prevent DispatchMouseMovement from dispatching any posted motion event.
last_motion_in_screen_.reset(); last_motion_in_screen_.reset();
// We undo our emulated mouse click from RunMoveLoop();
if (should_reset_mouse_flags_) {
aura::Env::GetInstance()->set_mouse_button_flags(0);
should_reset_mouse_flags_ = false;
}
// TODO(erg): Is this ungrab the cause of having to click to give input focus // TODO(erg): Is this ungrab the cause of having to click to give input focus
// on drawn out windows? Not ungrabbing here screws the X server until I kill // on drawn out windows? Not ungrabbing here screws the X server until I kill
// the chrome process. // the chrome process.
......
...@@ -76,8 +76,6 @@ class X11WholeScreenMoveLoop : public X11MoveLoop, ...@@ -76,8 +76,6 @@ class X11WholeScreenMoveLoop : public X11MoveLoop,
// quits. // quits.
gfx::NativeCursor initial_cursor_; gfx::NativeCursor initial_cursor_;
bool should_reset_mouse_flags_;
// An invisible InputOnly window. Keyboard grab and sometimes mouse grab // An invisible InputOnly window. Keyboard grab and sometimes mouse grab
// are set on this window. // are set on this window.
XID grab_input_window_; XID grab_input_window_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment