| Index: ui/base/x/selection_owner.cc
|
| diff --git a/ui/base/x/selection_owner.cc b/ui/base/x/selection_owner.cc
|
| index ea0ad226f32eafebc45101073a89fba1b5e146c6..af58a3787a58d8548386e4219cee3f83bc5069f5 100644
|
| --- a/ui/base/x/selection_owner.cc
|
| +++ b/ui/base/x/selection_owner.cc
|
| @@ -10,8 +10,8 @@
|
|
|
| #include "base/logging.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_event_manager.h"
|
| #include "ui/events/platform/x11/x11_event_source.h"
|
|
|
| namespace ui {
|
| @@ -269,10 +269,17 @@
|
| base::TimeTicks timeout =
|
| base::TimeTicks::Now() +
|
| base::TimeDelta::FromMilliseconds(kIncrementalTransferTimeoutMs);
|
| - requestor_events_.reset(
|
| - new ui::XScopedEventSelector(requestor, PropertyChangeMask));
|
| - incremental_transfers_.push_back(IncrementalTransfer(
|
| - requestor, target, property, it->second, 0, timeout));
|
| + int foreign_window_manager_id =
|
| + ui::XForeignWindowManager::GetInstance()->RequestEvents(
|
| + requestor, PropertyChangeMask);
|
| + incremental_transfers_.push_back(
|
| + IncrementalTransfer(requestor,
|
| + target,
|
| + property,
|
| + it->second,
|
| + 0,
|
| + timeout,
|
| + foreign_window_manager_id));
|
|
|
| // Start a timer to abort the data transfer in case that the selection
|
| // requestor does not support the INCR property or gets destroyed during
|
| @@ -338,8 +345,8 @@
|
|
|
| void SelectionOwner::CompleteIncrementalTransfer(
|
| std::vector<IncrementalTransfer>::iterator it) {
|
| - requestor_events_.reset();
|
| -
|
| + ui::XForeignWindowManager::GetInstance()->CancelRequest(
|
| + it->foreign_window_manager_id);
|
| incremental_transfers_.erase(it);
|
|
|
| if (incremental_transfers_.empty())
|
| @@ -366,13 +373,16 @@
|
| XAtom property,
|
| const scoped_refptr<base::RefCountedMemory>& data,
|
| int offset,
|
| - base::TimeTicks timeout)
|
| + base::TimeTicks timeout,
|
| + int foreign_window_manager_id)
|
| : window(window),
|
| target(target),
|
| property(property),
|
| data(data),
|
| offset(offset),
|
| - timeout(timeout) {}
|
| + timeout(timeout),
|
| + foreign_window_manager_id(foreign_window_manager_id) {
|
| +}
|
|
|
| SelectionOwner::IncrementalTransfer::IncrementalTransfer(
|
| const IncrementalTransfer& other) = default;
|
|
|