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

Unified Diff: ui/compositor/test/test_compositor_host_x11.cc

Issue 2319933002: X11: Remove calls to XSelectInput (Closed)
Patch Set: Comments Created 4 years, 3 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/compositor/test/DEPS ('k') | ui/events/platform/x11/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/test/test_compositor_host_x11.cc
diff --git a/ui/compositor/test/test_compositor_host_x11.cc b/ui/compositor/test/test_compositor_host_x11.cc
index e9262233d954c8921c432c2dc3fd8a9e79746a32..82fc7ad1239bbd325ef544c36535817bca6851d1 100644
--- a/ui/compositor/test/test_compositor_host_x11.cc
+++ b/ui/compositor/test/test_compositor_host_x11.cc
@@ -14,6 +14,7 @@
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "base/threading/thread_task_runner_handle.h"
+#include "ui/base/x/x11_window_event_manager.h"
#include "ui/compositor/compositor.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/x/x11_types.h"
@@ -39,6 +40,8 @@ class TestCompositorHostX11 : public TestCompositorHost {
XID window_;
+ std::unique_ptr<XScopedEventSelector> window_events_;
+
DISALLOW_COPY_AND_ASSIGN(TestCompositorHostX11);
};
@@ -49,23 +52,23 @@ TestCompositorHostX11::TestCompositorHostX11(
context_factory_(context_factory),
compositor_(context_factory_, base::ThreadTaskRunnerHandle::Get()) {}
-TestCompositorHostX11::~TestCompositorHostX11() {
-}
+TestCompositorHostX11::~TestCompositorHostX11() {}
void TestCompositorHostX11::Show() {
XDisplay* display = gfx::GetXDisplay();
XSetWindowAttributes swa;
- swa.event_mask = StructureNotifyMask | ExposureMask;
swa.override_redirect = True;
window_ = XCreateWindow(
display,
RootWindow(display, DefaultScreen(display)), // parent
bounds_.x(), bounds_.y(), bounds_.width(), bounds_.height(),
- 0, // border width
+ 0, // border width
CopyFromParent, // depth
InputOutput,
CopyFromParent, // visual
- CWEventMask | CWOverrideRedirect, &swa);
+ CWOverrideRedirect, &swa);
+ window_events_.reset(
+ new XScopedEventSelector(window_, StructureNotifyMask | ExposureMask));
XMapWindow(display, window_);
while (1) {
« no previous file with comments | « ui/compositor/test/DEPS ('k') | ui/events/platform/x11/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698