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

Issue 10828133: Desktop Aura: Allow tab drags out of window. (Closed)

Created:
8 years, 4 months ago by Elliot Glaysher
Modified:
8 years, 4 months ago
CC:
chromium-reviews, tfarina, sadrul, ben+watch_chromium.org
Visibility:
Public.

Description

Desktop Aura: Allow tab drags out of window. You can now drag tabs in and out of windows in linux_aura builds. This patch has a lot of moving parts and caveats though. Moving parts in the patch: - Added system location to aura::Events. - Forwarding move events from RootWindowHostLinux to the TabDragController through an observer. - MessagePumpAuraX11 now can block waiting for a window to be mapped. If we don't do this, we can't perform a grab on the new window. - The drag offset is threaded from TabDragController through the WindowMoveController interface. (There's no other non-racey way of getting this data locally from X.) - RootWindowHostLinux now has working Show()/Hide(). TODOs: - After releasing a new window, the window looks focused, but isn't. You have to click on it for it to receive input focus. BUG=133059 TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=152180

Patch Set 1 #

Patch Set 2 : Pretty much everything works on Linux now #

Patch Set 3 : Rebase to ToT with fix for Ben's ui::Event refactor. #

Patch Set 4 : OK, let's try compiling this bad boy. #

Patch Set 5 : Fix #if defined #

Patch Set 6 : Lots of compile fixes. Lets try again. #

Patch Set 7 : chromeos unit tests and windows compile fixes. #

Patch Set 8 : Rebase to ToT after views now uses ui::Event. #

Patch Set 9 : Pull out system_loc changes. #

Patch Set 10 : For review #

Total comments: 2

Patch Set 11 : Make sure we have a valid system location #

Total comments: 3

Patch Set 12 : add comment for sky #

Patch Set 13 : add comment for sky (git cl sucks) #

Patch Set 14 : Better mouse tracking #

Total comments: 18

Patch Set 15 : Comments and changes for derat #

Patch Set 16 : fix for derat #

Patch Set 17 : rebase to tot #

Total comments: 9

Patch Set 18 : sky changes #

Patch Set 19 : Attempt to fix tests now that we're processing configuration events before our notify. #

Total comments: 1

Patch Set 20 : Cleanup #

Unified diffs Side-by-side diffs Delta from patch set Stats (+481 lines, -79 lines) Patch
M ash/display/display_controller_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +5 lines, -3 lines 0 comments Download
M ash/display/multi_display_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +0 lines, -5 lines 0 comments Download
M ash/wm/toplevel_window_event_filter.h View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M ash/wm/toplevel_window_event_filter.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M base/message_loop.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +5 lines, -1 line 0 comments Download
M base/message_pump_aurax11.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +19 lines, -0 lines 0 comments Download
M base/message_pump_aurax11.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +23 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/tabs/tab_drag_controller.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +10 lines, -2 lines 0 comments Download
M chrome/browser/ui/views/tabs/tab_drag_controller.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 8 chunks +24 lines, -6 lines 0 comments Download
M ui/aura/client/window_move_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +7 lines, -2 lines 0 comments Download
M ui/aura/root_window.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +4 lines, -0 lines 0 comments Download
M ui/aura/root_window.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +11 lines, -0 lines 0 comments Download
M ui/aura/root_window_host.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M ui/aura/root_window_host_delegate.h View 1 2 2 chunks +2 lines, -0 lines 0 comments Download
M ui/aura/root_window_host_linux.h View 1 2 chunks +4 lines, -0 lines 0 comments Download
M ui/aura/root_window_host_linux.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +27 lines, -8 lines 0 comments Download
M ui/aura/root_window_host_win.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M ui/aura/root_window_host_win.cc View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M ui/aura/root_window_observer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +5 lines, -0 lines 0 comments Download
M ui/aura/window_observer.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M ui/base/cocoa/events_mac.mm View 1 2 3 1 chunk +7 lines, -0 lines 0 comments Download
M ui/base/event.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +19 lines, -1 line 0 comments Download
M ui/base/event.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +9 lines, -3 lines 0 comments Download
M ui/base/events.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +4 lines, -0 lines 0 comments Download
M ui/base/win/events_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +7 lines, -0 lines 0 comments Download
M ui/base/x/events_x.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +26 lines, -3 lines 0 comments Download
M ui/views/views.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +2 lines, -0 lines 0 comments Download
M ui/views/widget/desktop_native_widget_helper_aura.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 7 chunks +15 lines, -1 line 0 comments Download
M ui/views/widget/desktop_native_widget_helper_aura.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6 chunks +36 lines, -5 lines 0 comments Download
M ui/views/widget/native_widget_aura.h View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M ui/views/widget/native_widget_aura.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +5 lines, -6 lines 0 comments Download
M ui/views/widget/native_widget_helper_aura.h View 1 1 chunk +0 lines, -3 lines 0 comments Download
M ui/views/widget/native_widget_private.h View 1 1 chunk +1 line, -1 line 0 comments Download
M ui/views/widget/native_widget_win.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +2 lines, -1 line 0 comments Download
M ui/views/widget/native_widget_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +2 lines, -1 line 0 comments Download
M ui/views/widget/widget.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +4 lines, -2 lines 0 comments Download
M ui/views/widget/widget.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +2 lines, -2 lines 0 comments Download
A ui/views/widget/x11_desktop_window_move_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +55 lines, -0 lines 0 comments Download
A ui/views/widget/x11_desktop_window_move_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +123 lines, -0 lines 0 comments Download
M ui/views/widget/x11_window_event_filter.cc View 1 2 1 chunk +1 line, -20 lines 0 comments Download

Messages

Total messages: 21 (0 generated)
Elliot Glaysher
This patch is big; and I'm going to ask for some advice in the comments. ...
8 years, 4 months ago (2012-08-14 21:49:53 UTC) #1
sky
https://chromiumcodereview.appspot.com/10828133/diff/156/chrome/browser/ui/views/tabs/tab_drag_controller.cc File chrome/browser/ui/views/tabs/tab_drag_controller.cc (right): https://chromiumcodereview.appspot.com/10828133/diff/156/chrome/browser/ui/views/tabs/tab_drag_controller.cc#newcode489 chrome/browser/ui/views/tabs/tab_drag_controller.cc:489: RunMoveLoop(mouse_offset_); // Runs a nested loop, returning when done. ...
8 years, 4 months ago (2012-08-14 22:49:23 UTC) #2
Elliot Glaysher
https://chromiumcodereview.appspot.com/10828133/diff/156/chrome/browser/ui/views/tabs/tab_drag_controller.cc File chrome/browser/ui/views/tabs/tab_drag_controller.cc (right): https://chromiumcodereview.appspot.com/10828133/diff/156/chrome/browser/ui/views/tabs/tab_drag_controller.cc#newcode489 chrome/browser/ui/views/tabs/tab_drag_controller.cc:489: RunMoveLoop(mouse_offset_); // Runs a nested loop, returning when done. ...
8 years, 4 months ago (2012-08-14 22:55:00 UTC) #3
sky
That's something like the following placed in Init. gfx::Point start_location(source_tab_offset, mouse_offset_.y()); View::ConvertPointToWidget(source_tab, &start_location); But I'm ...
8 years, 4 months ago (2012-08-14 23:00:39 UTC) #4
Elliot Glaysher
Done at attach() time.
8 years, 4 months ago (2012-08-15 20:07:17 UTC) #5
Daniel Erat
https://chromiumcodereview.appspot.com/10828133/diff/5084/base/message_pump_aurax11.h File base/message_pump_aurax11.h (right): https://chromiumcodereview.appspot.com/10828133/diff/5084/base/message_pump_aurax11.h#newcode16 base/message_pump_aurax11.h:16: // It would be nice to including X11 headers ...
8 years, 4 months ago (2012-08-15 20:30:57 UTC) #6
Elliot Glaysher
https://chromiumcodereview.appspot.com/10828133/diff/5084/ui/aura/root_window_host_linux.cc File ui/aura/root_window_host_linux.cc (right): https://chromiumcodereview.appspot.com/10828133/diff/5084/ui/aura/root_window_host_linux.cc#newcode810 ui/aura/root_window_host_linux.cc:810: XUnmapWindow(xdisplay_, xwindow_); On 2012/08/15 20:30:57, Daniel Erat wrote: > ...
8 years, 4 months ago (2012-08-15 20:55:59 UTC) #7
Daniel Erat
https://chromiumcodereview.appspot.com/10828133/diff/5084/ui/views/widget/x11_desktop_window_move_client.cc File ui/views/widget/x11_desktop_window_move_client.cc (right): https://chromiumcodereview.appspot.com/10828133/diff/5084/ui/views/widget/x11_desktop_window_move_client.cc#newcode95 ui/views/widget/x11_desktop_window_move_client.cc:95: NOTREACHED() << "Grab failed: " << ret; On 2012/08/15 ...
8 years, 4 months ago (2012-08-16 00:25:17 UTC) #8
Elliot Glaysher
https://chromiumcodereview.appspot.com/10828133/diff/5084/ui/views/widget/x11_desktop_window_move_client.cc File ui/views/widget/x11_desktop_window_move_client.cc (right): https://chromiumcodereview.appspot.com/10828133/diff/5084/ui/views/widget/x11_desktop_window_move_client.cc#newcode95 ui/views/widget/x11_desktop_window_move_client.cc:95: NOTREACHED() << "Grab failed: " << ret; On 2012/08/16 ...
8 years, 4 months ago (2012-08-16 19:32:53 UTC) #9
Daniel Erat
The X stuff LGTM now. https://chromiumcodereview.appspot.com/10828133/diff/163/ui/views/widget/x11_desktop_window_move_client.cc File ui/views/widget/x11_desktop_window_move_client.cc (right): https://chromiumcodereview.appspot.com/10828133/diff/163/ui/views/widget/x11_desktop_window_move_client.cc#newcode26 ui/views/widget/x11_desktop_window_move_client.cc:26: X11DesktopWindowMoveClient::~X11DesktopWindowMoveClient() {} should this ...
8 years, 4 months ago (2012-08-16 19:45:13 UTC) #10
Elliot Glaysher
ping sky https://chromiumcodereview.appspot.com/10828133/diff/163/ui/views/widget/x11_desktop_window_move_client.cc File ui/views/widget/x11_desktop_window_move_client.cc (right): https://chromiumcodereview.appspot.com/10828133/diff/163/ui/views/widget/x11_desktop_window_move_client.cc#newcode26 ui/views/widget/x11_desktop_window_move_client.cc:26: X11DesktopWindowMoveClient::~X11DesktopWindowMoveClient() {} On 2012/08/16 19:45:13, Daniel Erat ...
8 years, 4 months ago (2012-08-16 19:50:31 UTC) #11
sky
https://chromiumcodereview.appspot.com/10828133/diff/163/chrome/browser/ui/views/tabs/tab_drag_controller.h File chrome/browser/ui/views/tabs/tab_drag_controller.h (right): https://chromiumcodereview.appspot.com/10828133/diff/163/chrome/browser/ui/views/tabs/tab_drag_controller.h#newcode324 chrome/browser/ui/views/tabs/tab_drag_controller.h:324: void RunMoveLoop(const gfx::Point& drag_offset); Document drag_offset. https://chromiumcodereview.appspot.com/10828133/diff/163/chrome/browser/ui/views/tabs/tab_drag_controller.h#newcode477 chrome/browser/ui/views/tabs/tab_drag_controller.h:477: gfx::Point ...
8 years, 4 months ago (2012-08-16 20:11:20 UTC) #12
Elliot Glaysher
https://chromiumcodereview.appspot.com/10828133/diff/163/chrome/browser/ui/views/tabs/tab_drag_controller.h File chrome/browser/ui/views/tabs/tab_drag_controller.h (right): https://chromiumcodereview.appspot.com/10828133/diff/163/chrome/browser/ui/views/tabs/tab_drag_controller.h#newcode477 chrome/browser/ui/views/tabs/tab_drag_controller.h:477: gfx::Point window_mouse_offset_; On 2012/08/16 20:11:20, sky wrote: > Add ...
8 years, 4 months ago (2012-08-16 20:33:47 UTC) #13
sky
LGTM
8 years, 4 months ago (2012-08-16 20:57:22 UTC) #14
Elliot Glaysher
brettw: base stamp?
8 years, 4 months ago (2012-08-16 21:26:58 UTC) #15
Ben Goodger (Google)
lgtm also for the aura/event changes. https://chromiumcodereview.appspot.com/10828133/diff/15042/ui/base/event.h File ui/base/event.h (right): https://chromiumcodereview.appspot.com/10828133/diff/15042/ui/base/event.h#newcode184 ui/base/event.h:184: // |location_| in ...
8 years, 4 months ago (2012-08-16 22:51:39 UTC) #16
brettw
base lgtm
8 years, 4 months ago (2012-08-17 17:38:43 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/erg@chromium.org/10828133/5148
8 years, 4 months ago (2012-08-17 17:39:34 UTC) #18
commit-bot: I haz the power
Try job failure for 10828133-5148 on win_rel for step "update". http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=53414 Step "update" is always ...
8 years, 4 months ago (2012-08-17 18:10:14 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/erg@chromium.org/10828133/5148
8 years, 4 months ago (2012-08-17 18:13:04 UTC) #20
commit-bot: I haz the power
8 years, 4 months ago (2012-08-17 22:43:48 UTC) #21
Change committed as 152180

Powered by Google App Engine
This is Rietveld 408576698