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

Side by Side Diff: ui/aura/root_window_host_x11.cc

Issue 23622035: x11: Prefer using ui::GetXDisplay() over getting the Display from the X11 message-pump. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/display/mirror_window_controller.cc ('k') | ui/aura/test/ui_controls_factory_aurax11.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/aura/root_window_host_x11.h" 5 #include "ui/aura/root_window_host_x11.h"
6 6
7 #include <strings.h> 7 #include <strings.h>
8 #include <X11/cursorfont.h> 8 #include <X11/cursorfont.h>
9 #include <X11/extensions/Xfixes.h> 9 #include <X11/extensions/Xfixes.h>
10 #include <X11/extensions/XInput2.h> 10 #include <X11/extensions/XInput2.h>
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 size_t insert_index_; 356 size_t insert_index_;
357 357
358 DISALLOW_COPY_AND_ASSIGN(MouseMoveFilter); 358 DISALLOW_COPY_AND_ASSIGN(MouseMoveFilter);
359 }; 359 };
360 360
361 //////////////////////////////////////////////////////////////////////////////// 361 ////////////////////////////////////////////////////////////////////////////////
362 // RootWindowHostX11 362 // RootWindowHostX11
363 363
364 RootWindowHostX11::RootWindowHostX11(const gfx::Rect& bounds) 364 RootWindowHostX11::RootWindowHostX11(const gfx::Rect& bounds)
365 : delegate_(NULL), 365 : delegate_(NULL),
366 xdisplay_(base::MessagePumpX11::GetDefaultXDisplay()), 366 xdisplay_(ui::GetXDisplay()),
367 xwindow_(0), 367 xwindow_(0),
368 x_root_window_(DefaultRootWindow(xdisplay_)), 368 x_root_window_(DefaultRootWindow(xdisplay_)),
369 current_cursor_(ui::kCursorNull), 369 current_cursor_(ui::kCursorNull),
370 window_mapped_(false), 370 window_mapped_(false),
371 bounds_(bounds), 371 bounds_(bounds),
372 is_internal_display_(false), 372 is_internal_display_(false),
373 focus_when_shown_(false), 373 focus_when_shown_(false),
374 touch_calibrate_(new internal::TouchEventCalibrate), 374 touch_calibrate_(new internal::TouchEventCalibrate),
375 mouse_move_filter_(new MouseMoveFilter), 375 mouse_move_filter_(new MouseMoveFilter),
376 atom_cache_(xdisplay_, kAtomsToCache), 376 atom_cache_(xdisplay_, kAtomsToCache),
(...skipping 706 matching lines...) Expand 10 before | Expand all | Expand 10 after
1083 #endif 1083 #endif
1084 } 1084 }
1085 1085
1086 // static 1086 // static
1087 RootWindowHost* RootWindowHost::Create(const gfx::Rect& bounds) { 1087 RootWindowHost* RootWindowHost::Create(const gfx::Rect& bounds) {
1088 return new RootWindowHostX11(bounds); 1088 return new RootWindowHostX11(bounds);
1089 } 1089 }
1090 1090
1091 // static 1091 // static
1092 gfx::Size RootWindowHost::GetNativeScreenSize() { 1092 gfx::Size RootWindowHost::GetNativeScreenSize() {
1093 ::Display* xdisplay = base::MessagePumpX11::GetDefaultXDisplay(); 1093 ::Display* xdisplay = ui::GetXDisplay();
1094 return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0)); 1094 return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0));
1095 } 1095 }
1096 1096
1097 namespace test { 1097 namespace test {
1098 1098
1099 void SetUseOverrideRedirectWindowByDefault(bool override_redirect) { 1099 void SetUseOverrideRedirectWindowByDefault(bool override_redirect) {
1100 default_override_redirect = override_redirect; 1100 default_override_redirect = override_redirect;
1101 } 1101 }
1102 1102
1103 } // namespace test 1103 } // namespace test
1104 } // namespace aura 1104 } // namespace aura
OLDNEW
« no previous file with comments | « ash/display/mirror_window_controller.cc ('k') | ui/aura/test/ui_controls_factory_aurax11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698