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

Unified Diff: ui/views/widget/desktop_root_window_host_linux.cc

Issue 11193005: linux desktop aura: Get tab dragging working. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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 | « ui/views/widget/desktop_root_window_host_linux.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/desktop_root_window_host_linux.cc
diff --git a/ui/views/widget/desktop_root_window_host_linux.cc b/ui/views/widget/desktop_root_window_host_linux.cc
index 25d9846078b04ecd860bdd5f038c7a5f205ba9b6..113295c97ed830ee4869b33b615c6071eaae6a99 100644
--- a/ui/views/widget/desktop_root_window_host_linux.cc
+++ b/ui/views/widget/desktop_root_window_host_linux.cc
@@ -28,6 +28,7 @@
#include "ui/views/widget/desktop_native_widget_aura.h"
#include "ui/views/widget/desktop_screen_position_client.h"
#include "ui/views/widget/x11_desktop_handler.h"
+#include "ui/views/widget/x11_desktop_window_move_client.h"
#include "ui/views/widget/x11_window_event_filter.h"
namespace views {
@@ -223,6 +224,11 @@ aura::RootWindow* DesktopRootWindowHostLinux::InitRootWindow(
x11_window_event_filter_->SetUseHostWindowBorders(false);
root_window_event_filter_->AddFilter(x11_window_event_filter_.get());
+ x11_window_move_client_.reset(new X11DesktopWindowMoveClient);
+ root_window_event_filter_->AddFilter(x11_window_move_client_.get());
+ aura::client::SetWindowMoveClient(root_window_,
+ x11_window_move_client_.get());
+
return root_window_;
}
@@ -300,6 +306,7 @@ void DesktopRootWindowHostLinux::Close() {
void DesktopRootWindowHostLinux::CloseNow() {
// Remove the event listeners we've installed. We need to remove these
// because otherwise we get assert during ~RootWindow().
+ root_window_event_filter_->RemoveFilter(x11_window_move_client_.get());
root_window_event_filter_->RemoveFilter(x11_window_event_filter_.get());
root_window_event_filter_->RemoveFilter(input_method_filter_.get());
@@ -500,14 +507,17 @@ void DesktopRootWindowHostLinux::ClearNativeFocus() {
Widget::MoveLoopResult DesktopRootWindowHostLinux::RunMoveLoop(
const gfx::Point& drag_offset) {
- // TODO(erg):
- NOTIMPLEMENTED();
+ SetCapture();
+
+ if (x11_window_move_client_->RunMoveLoop(content_window_, drag_offset) ==
+ aura::client::MOVE_SUCCESSFUL)
+ return Widget::MOVE_LOOP_SUCCESSFUL;
+
return Widget::MOVE_LOOP_CANCELED;
}
void DesktopRootWindowHostLinux::EndMoveLoop() {
- // TODO(erg):
- NOTIMPLEMENTED();
+ x11_window_move_client_->EndMoveLoop();
}
void DesktopRootWindowHostLinux::SetVisibilityChangedAnimationsEnabled(
« no previous file with comments | « ui/views/widget/desktop_root_window_host_linux.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698