Index: ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc |
diff --git a/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc b/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc |
index 74c10787dc12e5ed7d74d10de627be97270de6fb..53314d4b9bf23aa5c0af5d5edb78bd61863081cc 100644 |
--- a/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc |
+++ b/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc |
@@ -23,8 +23,8 @@ |
#include "ui/base/dragdrop/os_exchange_data.h" |
#include "ui/base/dragdrop/os_exchange_data_provider_aurax11.h" |
#include "ui/base/x/selection_utils.h" |
-#include "ui/base/x/x11_foreign_window_manager.h" |
#include "ui/base/x/x11_util.h" |
+#include "ui/base/x/x11_window_manager.h" |
#include "ui/display/screen.h" |
#include "ui/events/event.h" |
#include "ui/events/event_utils.h" |
@@ -201,10 +201,6 @@ class DesktopDragDropClientAuraX11::X11DragContext |
// belongs to a Chrome window. |
DesktopDragDropClientAuraX11* source_client_; |
- // Used to unselect PropertyChangeMask on |source_window_| if |source_window_| |
- // does not belong to a Chrome window when X11DragContext is destroyed. |
- int foreign_window_manager_source_window_id_; |
- |
// The client we inform once we're done with requesting data. |
DesktopDragDropClientAuraX11* drag_drop_client_; |
@@ -241,7 +237,6 @@ DesktopDragDropClientAuraX11::X11DragContext::X11DragContext( |
source_window_(event.data.l[0]), |
source_client_( |
DesktopDragDropClientAuraX11::GetForWindow(source_window_)), |
- foreign_window_manager_source_window_id_(0), |
drag_drop_client_(NULL), |
waiting_to_handle_position_(false), |
suggested_action_(None) { |
@@ -266,9 +261,8 @@ DesktopDragDropClientAuraX11::X11DragContext::X11DragContext( |
// The window doesn't have a DesktopDragDropClientAuraX11, that means it's |
// created by some other process. Listen for messages on it. |
ui::PlatformEventSource::GetInstance()->AddPlatformEventDispatcher(this); |
- foreign_window_manager_source_window_id_ = |
- ui::XForeignWindowManager::GetInstance()->RequestEvents( |
- source_window_, PropertyChangeMask); |
+ ui::XWindowManager::GetInstance()->SelectEvents(source_window_, |
+ PropertyChangeMask); |
// We must perform a full sync here because we could be racing |
// |source_window_|. |
@@ -287,8 +281,8 @@ DesktopDragDropClientAuraX11::X11DragContext::~X11DragContext() { |
if (!source_client_) { |
// Unsubscribe from message events. |
ui::PlatformEventSource::GetInstance()->RemovePlatformEventDispatcher(this); |
- ui::XForeignWindowManager::GetInstance()->CancelRequest( |
- foreign_window_manager_source_window_id_); |
+ ui::XWindowManager::GetInstance()->DeselectEvents(source_window_, |
+ PropertyChangeMask); |
} |
} |