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

Side by Side Diff: ui/views/widget/desktop_root_window_host_linux.cc

Issue 10941040: linux_aura: Make combo boxes work with DesktopRootWindowHostLinux. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Get rid of testing dlogs Created 8 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
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/views/widget/desktop_root_window_host_linux.h" 5 #include "ui/views/widget/desktop_root_window_host_linux.h"
6 6
7 #include <X11/extensions/XInput2.h> 7 #include <X11/extensions/XInput2.h>
8 #include <X11/Xatom.h> 8 #include <X11/Xatom.h>
9 #include <X11/Xutil.h> 9 #include <X11/Xutil.h>
10 10
11 #include "base/message_pump_aurax11.h" 11 #include "base/message_pump_aurax11.h"
12 #include "base/stringprintf.h" 12 #include "base/stringprintf.h"
13 #include "base/utf_string_conversions.h"
13 #include "ui/aura/client/screen_position_client.h" 14 #include "ui/aura/client/screen_position_client.h"
14 #include "ui/aura/client/user_action_client.h" 15 #include "ui/aura/client/user_action_client.h"
15 #include "ui/aura/desktop/desktop_activation_client.h" 16 #include "ui/aura/desktop/desktop_activation_client.h"
16 #include "ui/aura/desktop/desktop_dispatcher_client.h" 17 #include "ui/aura/desktop/desktop_dispatcher_client.h"
18 #include "ui/aura/desktop/desktop_layout_manager.h"
17 #include "ui/aura/focus_manager.h" 19 #include "ui/aura/focus_manager.h"
18 #include "ui/aura/root_window.h" 20 #include "ui/aura/root_window.h"
19 #include "ui/aura/shared/compound_event_filter.h" 21 #include "ui/aura/shared/compound_event_filter.h"
20 #include "ui/aura/shared/input_method_event_filter.h" 22 #include "ui/aura/shared/input_method_event_filter.h"
21 #include "ui/base/touch/touch_factory.h" 23 #include "ui/base/touch/touch_factory.h"
22 #include "ui/base/x/x11_util.h" 24 #include "ui/base/x/x11_util.h"
23 #include "ui/views/widget/desktop_capture_client.h" 25 #include "ui/views/widget/desktop_capture_client.h"
24 #include "ui/views/widget/x11_desktop_handler.h" 26 #include "ui/views/widget/x11_desktop_handler.h"
25 #include "ui/views/widget/x11_window_event_filter.h" 27 #include "ui/views/widget/x11_window_event_filter.h"
26 28
(...skipping 11 matching lines...) Expand all
38 "_NET_WM_PID", 40 "_NET_WM_PID",
39 "WM_S0", 41 "WM_S0",
40 NULL 42 NULL
41 }; 43 };
42 44
43 } // namespace 45 } // namespace
44 46
45 //////////////////////////////////////////////////////////////////////////////// 47 ////////////////////////////////////////////////////////////////////////////////
46 // DesktopRootWindowHostLinux, public: 48 // DesktopRootWindowHostLinux, public:
47 49
48 DesktopRootWindowHostLinux::DesktopRootWindowHostLinux() 50 DesktopRootWindowHostLinux::DesktopRootWindowHostLinux(
51 internal::NativeWidgetDelegate* native_widget_delegate,
52 const gfx::Rect& initial_bounds)
49 : xdisplay_(base::MessagePumpAuraX11::GetDefaultXDisplay()), 53 : xdisplay_(base::MessagePumpAuraX11::GetDefaultXDisplay()),
50 xwindow_(0), 54 xwindow_(0),
51 x_root_window_(DefaultRootWindow(xdisplay_)), 55 x_root_window_(DefaultRootWindow(xdisplay_)),
52 atom_cache_(xdisplay_, kAtomsToCache), 56 atom_cache_(xdisplay_, kAtomsToCache),
53 window_mapped_(false), 57 window_mapped_(false),
54 focus_when_shown_(false) { 58 focus_when_shown_(false),
59 native_widget_delegate_(native_widget_delegate) {
55 } 60 }
56 61
57 DesktopRootWindowHostLinux::~DesktopRootWindowHostLinux() { 62 DesktopRootWindowHostLinux::~DesktopRootWindowHostLinux() {
58 base::MessagePumpAuraX11::Current()->RemoveDispatcherForWindow(xwindow_); 63 base::MessagePumpAuraX11::Current()->RemoveDispatcherForWindow(xwindow_);
59 XDestroyWindow(xdisplay_, xwindow_); 64 XDestroyWindow(xdisplay_, xwindow_);
60 } 65 }
61 66
62 //////////////////////////////////////////////////////////////////////////////// 67 ////////////////////////////////////////////////////////////////////////////////
63 // DesktopRootWindowHostLinux, private: 68 // DesktopRootWindowHostLinux, private:
64 69
65 void DesktopRootWindowHostLinux::InitX11Window(const gfx::Rect& bounds) { 70 void DesktopRootWindowHostLinux::InitX11Window(
71 const Widget::InitParams& params) {
72 unsigned long attribute_mask = CWBackPixmap;
66 XSetWindowAttributes swa; 73 XSetWindowAttributes swa;
67 memset(&swa, 0, sizeof(swa)); 74 memset(&swa, 0, sizeof(swa));
68 swa.background_pixmap = None; 75 swa.background_pixmap = None;
76
77 if (params.type == Widget::InitParams::TYPE_MENU) {
78 swa.override_redirect = True;
79 attribute_mask |= CWOverrideRedirect;
80 }
81
69 xwindow_ = XCreateWindow( 82 xwindow_ = XCreateWindow(
70 xdisplay_, x_root_window_, 83 xdisplay_, x_root_window_,
71 bounds.x(), bounds.y(), bounds.width(), bounds.height(), 84 params.bounds.x(), params.bounds.y(),
85 params.bounds.width(), params.bounds.height(),
72 0, // border width 86 0, // border width
73 CopyFromParent, // depth 87 CopyFromParent, // depth
74 InputOutput, 88 InputOutput,
75 CopyFromParent, // visual 89 CopyFromParent, // visual
76 CWBackPixmap, 90 attribute_mask,
77 &swa); 91 &swa);
78 base::MessagePumpAuraX11::Current()->AddDispatcherForWindow(this, xwindow_); 92 base::MessagePumpAuraX11::Current()->AddDispatcherForWindow(this, xwindow_);
79 93
80 // TODO(erg): Maybe need to set a ViewProp here like in RWHL::RWHL(). 94 // TODO(erg): Maybe need to set a ViewProp here like in RWHL::RWHL().
81 95
82 long event_mask = ButtonPressMask | ButtonReleaseMask | FocusChangeMask | 96 long event_mask = ButtonPressMask | ButtonReleaseMask | FocusChangeMask |
83 KeyPressMask | KeyReleaseMask | 97 KeyPressMask | KeyReleaseMask |
84 EnterWindowMask | LeaveWindowMask | 98 EnterWindowMask | LeaveWindowMask |
85 ExposureMask | VisibilityChangeMask | 99 ExposureMask | VisibilityChangeMask |
86 StructureNotifyMask | PropertyChangeMask | 100 StructureNotifyMask | PropertyChangeMask |
(...skipping 19 matching lines...) Expand all
106 // Likewise, the X server needs to know this window's pid so it knows which 120 // Likewise, the X server needs to know this window's pid so it knows which
107 // program to kill if the window hangs. 121 // program to kill if the window hangs.
108 pid_t pid = getpid(); 122 pid_t pid = getpid();
109 XChangeProperty(xdisplay_, 123 XChangeProperty(xdisplay_,
110 xwindow_, 124 xwindow_,
111 atom_cache_.GetAtom("_NET_WM_PID"), 125 atom_cache_.GetAtom("_NET_WM_PID"),
112 XA_CARDINAL, 126 XA_CARDINAL,
113 32, 127 32,
114 PropModeReplace, 128 PropModeReplace,
115 reinterpret_cast<unsigned char*>(&pid), 1); 129 reinterpret_cast<unsigned char*>(&pid), 1);
116
117 // TODO(erg): Now that we're forked from RootWindowHostLinux, we should be
118 // doing a much better job about communicating things like the window title
119 // and icon to the window manager, which should replace this piece of copied
120 // code.
121 static int root_window_number = 0;
122 std::string name = StringPrintf("aura_root_%d", root_window_number++);
123 XStoreName(xdisplay_, xwindow_, name.c_str());
124 } 130 }
125 131
126 // TODO(erg): This method should basically be everything I need form 132 // TODO(erg): This method should basically be everything I need form
127 // RootWindowHostLinux::RootWindowHostLinux(). 133 // RootWindowHostLinux::RootWindowHostLinux().
128 void DesktopRootWindowHostLinux::InitRootWindow( 134 void DesktopRootWindowHostLinux::InitRootWindow(
129 const Widget::InitParams& params) { 135 const Widget::InitParams& params) {
130 aura::RootWindow::CreateParams rw_params(params.bounds); 136 bounds_ = params.bounds;
137
138 aura::RootWindow::CreateParams rw_params(bounds_);
131 rw_params.host = this; 139 rw_params.host = this;
132 root_window_.reset(new aura::RootWindow(rw_params)); 140 root_window_.reset(new aura::RootWindow(rw_params));
133 root_window_->Init(); 141 root_window_->Init();
134 root_window_->AddChild(content_window_); 142 root_window_->AddChild(content_window_);
143 root_window_->SetLayoutManager(
144 new aura::DesktopLayoutManager(root_window_.get()));
135 root_window_host_delegate_ = root_window_.get(); 145 root_window_host_delegate_ = root_window_.get();
136 146
147 // If we're given a parent, we need to mark ourselves as transient to another
148 // window. Otherwise activation gets screwy.
149 gfx::NativeView parent = params.GetParent();
150 if (!params.child && params.GetParent())
151 parent->AddTransientChild(content_window_);
152
153 native_widget_delegate_->OnNativeWidgetCreated();
154
137 capture_client_.reset(new DesktopCaptureClient); 155 capture_client_.reset(new DesktopCaptureClient);
138 aura::client::SetCaptureClient(root_window_.get(), capture_client_.get()); 156 aura::client::SetCaptureClient(root_window_.get(), capture_client_.get());
139 157
140 root_window_->set_focus_manager( 158 root_window_->set_focus_manager(
141 X11DesktopHandler::get()->get_focus_manager()); 159 X11DesktopHandler::get()->get_focus_manager());
142 160
143 aura::DesktopActivationClient* activation_client = 161 aura::DesktopActivationClient* activation_client =
144 X11DesktopHandler::get()->get_activation_client(); 162 X11DesktopHandler::get()->get_activation_client();
145 aura::client::SetActivationClient( 163 aura::client::SetActivationClient(
146 root_window_.get(), activation_client); 164 root_window_.get(), activation_client);
(...skipping 28 matching lines...) Expand all
175 //////////////////////////////////////////////////////////////////////////////// 193 ////////////////////////////////////////////////////////////////////////////////
176 // DesktopRootWindowHostLinux, DesktopRootWindowHost implementation: 194 // DesktopRootWindowHostLinux, DesktopRootWindowHost implementation:
177 195
178 void DesktopRootWindowHostLinux::Init(aura::Window* content_window, 196 void DesktopRootWindowHostLinux::Init(aura::Window* content_window,
179 const Widget::InitParams& params) { 197 const Widget::InitParams& params) {
180 content_window_ = content_window; 198 content_window_ = content_window;
181 199
182 // TODO(erg): Check whether we *should* be building a RootWindowHost here, or 200 // TODO(erg): Check whether we *should* be building a RootWindowHost here, or
183 // whether we should be proxying requests to another DRWHL. 201 // whether we should be proxying requests to another DRWHL.
184 202
185 // TODO(erg): We can finally solve the role problem! Based on params, try to 203 // In some situations, views tries to make a zero sized window, and that
186 // determine whether this is a utility window such as a menu. 204 // makes us crash. Make sure we have valid sizes.
205 Widget::InitParams sanitized_params = params;
206 if (sanitized_params.bounds.width() == 0)
207 sanitized_params.bounds.set_width(100);
208 if (sanitized_params.bounds.height() == 0)
209 sanitized_params.bounds.set_height(100);
187 210
188 InitX11Window(params.bounds); 211 InitX11Window(sanitized_params);
189 InitRootWindow(params); 212 InitRootWindow(sanitized_params);
190
191 // TODO(erg): This should be done by a LayoutManager instead of being a
192 // one-off hack.
193 content_window_->SetBounds(params.bounds);
194 213
195 // This needs to be the intersection of: 214 // This needs to be the intersection of:
196 // - NativeWidgetAura::InitNativeWidget() 215 // - NativeWidgetAura::InitNativeWidget()
197 // - DesktopNativeWidgetHelperAura::PreInitialize() 216 // - DesktopNativeWidgetHelperAura::PreInitialize()
198 } 217 }
199 218
200 void DesktopRootWindowHostLinux::Close() { 219 void DesktopRootWindowHostLinux::Close() {
201 // TODO(erg): 220 // TODO(erg):
202 NOTIMPLEMENTED(); 221 NOTIMPLEMENTED();
203 } 222 }
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 } 256 }
238 257
239 void DesktopRootWindowHostLinux::CenterWindow(const gfx::Size& size) { 258 void DesktopRootWindowHostLinux::CenterWindow(const gfx::Size& size) {
240 // TODO(erg): 259 // TODO(erg):
241 NOTIMPLEMENTED(); 260 NOTIMPLEMENTED();
242 } 261 }
243 262
244 void DesktopRootWindowHostLinux::GetWindowPlacement( 263 void DesktopRootWindowHostLinux::GetWindowPlacement(
245 gfx::Rect* bounds, 264 gfx::Rect* bounds,
246 ui::WindowShowState* show_state) const { 265 ui::WindowShowState* show_state) const {
247 // TODO(erg): 266 *bounds = bounds_;
248 NOTIMPLEMENTED(); 267
268 // TODO(erg): This needs a better implementation. For now, we're just pass
269 // back the normal state until we keep track of this.
270 *show_state = ui::SHOW_STATE_NORMAL;
249 } 271 }
250 272
251 gfx::Rect DesktopRootWindowHostLinux::GetWindowBoundsInScreen() const { 273 gfx::Rect DesktopRootWindowHostLinux::GetWindowBoundsInScreen() const {
252 // TODO(erg): 274 return bounds_;
253 NOTIMPLEMENTED();
254 return gfx::Rect();
255 } 275 }
256 276
257 gfx::Rect DesktopRootWindowHostLinux::GetClientAreaBoundsInScreen() const { 277 gfx::Rect DesktopRootWindowHostLinux::GetClientAreaBoundsInScreen() const {
258 // TODO(erg):
259 NOTIMPLEMENTED(); 278 NOTIMPLEMENTED();
260 return gfx::Rect(100, 100); 279 // TODO(erg): This is wrong, but would require looking at the actual views
280 // hierarchy to do correctly.
281 return bounds_;
261 } 282 }
262 283
263 gfx::Rect DesktopRootWindowHostLinux::GetRestoredBounds() const { 284 gfx::Rect DesktopRootWindowHostLinux::GetRestoredBounds() const {
264 // TODO(erg): 285 // TODO(erg):
265 NOTIMPLEMENTED(); 286 NOTIMPLEMENTED();
266 return gfx::Rect(); 287 return gfx::Rect();
267 } 288 }
268 289
269 void DesktopRootWindowHostLinux::SetShape(gfx::NativeRegion native_region) { 290 void DesktopRootWindowHostLinux::SetShape(gfx::NativeRegion native_region) {
270 // TODO(erg): 291 // TODO(erg):
271 NOTIMPLEMENTED(); 292 NOTIMPLEMENTED();
272 } 293 }
273 294
274 bool DesktopRootWindowHostLinux::ShouldUseNativeFrame() { 295 bool DesktopRootWindowHostLinux::ShouldUseNativeFrame() {
275 return false; 296 return false;
276 } 297 }
277 298
278 void DesktopRootWindowHostLinux::Activate() { 299 void DesktopRootWindowHostLinux::Activate() {
279 // TODO(erg): 300 // TODO(erg):
280 NOTIMPLEMENTED(); 301 NOTIMPLEMENTED();
281 } 302 }
282 303
283 void DesktopRootWindowHostLinux::Deactivate() { 304 void DesktopRootWindowHostLinux::Deactivate() {
284 // TODO(erg): 305 // TODO(erg):
285 NOTIMPLEMENTED(); 306 NOTIMPLEMENTED();
286 } 307 }
287 308
288 bool DesktopRootWindowHostLinux::IsActive() const { 309 bool DesktopRootWindowHostLinux::IsActive() const {
289 // TODO(erg): 310 // TODO(erg):
290 NOTIMPLEMENTED(); 311 //NOTIMPLEMENTED();
291 return true; 312 return true;
292 } 313 }
293 314
294 void DesktopRootWindowHostLinux::Maximize() { 315 void DesktopRootWindowHostLinux::Maximize() {
295 // TODO(erg): 316 // TODO(erg):
296 NOTIMPLEMENTED(); 317 NOTIMPLEMENTED();
297 } 318 }
298 319
299 void DesktopRootWindowHostLinux::Minimize() { 320 void DesktopRootWindowHostLinux::Minimize() {
300 // TODO(erg): 321 // TODO(erg):
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 } 357 }
337 358
338 internal::InputMethodDelegate* 359 internal::InputMethodDelegate*
339 DesktopRootWindowHostLinux::GetInputMethodDelegate() { 360 DesktopRootWindowHostLinux::GetInputMethodDelegate() {
340 // TODO(erg): 361 // TODO(erg):
341 NOTIMPLEMENTED(); 362 NOTIMPLEMENTED();
342 return NULL; 363 return NULL;
343 } 364 }
344 365
345 void DesktopRootWindowHostLinux::SetWindowTitle(const string16& title) { 366 void DesktopRootWindowHostLinux::SetWindowTitle(const string16& title) {
346 // TODO(erg): 367 XStoreName(xdisplay_, xwindow_, UTF16ToUTF8(title).c_str());
347 NOTIMPLEMENTED();
348 } 368 }
349 369
350 //////////////////////////////////////////////////////////////////////////////// 370 ////////////////////////////////////////////////////////////////////////////////
351 // DesktopRootWindowHostLinux, aura::RootWindowHost implementation: 371 // DesktopRootWindowHostLinux, aura::RootWindowHost implementation:
352 372
353 aura::RootWindow* DesktopRootWindowHostLinux::GetRootWindow() { 373 aura::RootWindow* DesktopRootWindowHostLinux::GetRootWindow() {
354 return root_window_.get(); 374 return root_window_.get();
355 } 375 }
356 376
357 gfx::AcceleratedWidget DesktopRootWindowHostLinux::GetAcceleratedWidget() { 377 gfx::AcceleratedWidget DesktopRootWindowHostLinux::GetAcceleratedWidget() {
(...skipping 24 matching lines...) Expand all
382 if (window_mapped_) { 402 if (window_mapped_) {
383 XWithdrawWindow(xdisplay_, xwindow_, 0); 403 XWithdrawWindow(xdisplay_, xwindow_, 0);
384 window_mapped_ = false; 404 window_mapped_ = false;
385 } 405 }
386 } 406 }
387 407
388 void DesktopRootWindowHostLinux::ToggleFullScreen() { 408 void DesktopRootWindowHostLinux::ToggleFullScreen() {
389 } 409 }
390 410
391 gfx::Rect DesktopRootWindowHostLinux::GetBounds() const { 411 gfx::Rect DesktopRootWindowHostLinux::GetBounds() const {
392 return gfx::Rect(100, 100); 412 return bounds_;
393 } 413 }
394 414
395 void DesktopRootWindowHostLinux::SetBounds(const gfx::Rect& bounds) { 415 void DesktopRootWindowHostLinux::SetBounds(const gfx::Rect& bounds) {
416 bool size_changed = bounds.size() != bounds_.size();
417
418 if (bounds != bounds_) {
419 XMoveResizeWindow(xdisplay_, xwindow_, bounds.x(), bounds.y(),
420 bounds.width(), bounds.height());
421 bounds_ = bounds;
422 }
423
424 if (size_changed)
425 root_window_host_delegate_->OnHostResized(bounds_.size());
426 else
427 root_window_host_delegate_->OnHostPaint();
396 } 428 }
397 429
398 gfx::Point DesktopRootWindowHostLinux::GetLocationOnNativeScreen() const { 430 gfx::Point DesktopRootWindowHostLinux::GetLocationOnNativeScreen() const {
431 NOTIMPLEMENTED();
399 return gfx::Point(1, 1); 432 return gfx::Point(1, 1);
400 } 433 }
401 434
402 void DesktopRootWindowHostLinux::SetCapture() { 435 void DesktopRootWindowHostLinux::SetCapture() {
436 NOTIMPLEMENTED();
403 } 437 }
404 438
405 void DesktopRootWindowHostLinux::ReleaseCapture() { 439 void DesktopRootWindowHostLinux::ReleaseCapture() {
440 NOTIMPLEMENTED();
406 } 441 }
407 442
408 void DesktopRootWindowHostLinux::SetCursor(gfx::NativeCursor cursor) { 443 void DesktopRootWindowHostLinux::SetCursor(gfx::NativeCursor cursor) {
444 NOTIMPLEMENTED();
409 } 445 }
410 446
411 void DesktopRootWindowHostLinux::ShowCursor(bool show) { 447 void DesktopRootWindowHostLinux::ShowCursor(bool show) {
448 NOTIMPLEMENTED();
412 } 449 }
413 450
414 bool DesktopRootWindowHostLinux::QueryMouseLocation( 451 bool DesktopRootWindowHostLinux::QueryMouseLocation(
415 gfx::Point* location_return) { 452 gfx::Point* location_return) {
453 NOTIMPLEMENTED();
416 return false; 454 return false;
417 } 455 }
418 456
419 bool DesktopRootWindowHostLinux::ConfineCursorToRootWindow() { 457 bool DesktopRootWindowHostLinux::ConfineCursorToRootWindow() {
458 NOTIMPLEMENTED();
420 return false; 459 return false;
421 } 460 }
422 461
423 void DesktopRootWindowHostLinux::UnConfineCursor() { 462 void DesktopRootWindowHostLinux::UnConfineCursor() {
463 NOTIMPLEMENTED();
424 } 464 }
425 465
426 void DesktopRootWindowHostLinux::MoveCursorTo(const gfx::Point& location) { 466 void DesktopRootWindowHostLinux::MoveCursorTo(const gfx::Point& location) {
467 NOTIMPLEMENTED();
427 } 468 }
428 469
429 void DesktopRootWindowHostLinux::SetFocusWhenShown(bool focus_when_shown) { 470 void DesktopRootWindowHostLinux::SetFocusWhenShown(bool focus_when_shown) {
430 static const char* k_NET_WM_USER_TIME = "_NET_WM_USER_TIME"; 471 static const char* k_NET_WM_USER_TIME = "_NET_WM_USER_TIME";
431 focus_when_shown_ = focus_when_shown; 472 focus_when_shown_ = focus_when_shown;
432 if (IsWindowManagerPresent() && !focus_when_shown_) { 473 if (IsWindowManagerPresent() && !focus_when_shown_) {
433 ui::SetIntProperty(xwindow_, 474 ui::SetIntProperty(xwindow_,
434 k_NET_WM_USER_TIME, 475 k_NET_WM_USER_TIME,
435 k_NET_WM_USER_TIME, 476 k_NET_WM_USER_TIME,
436 0); 477 0);
437 } 478 }
438 } 479 }
439 480
440 bool DesktopRootWindowHostLinux::GrabSnapshot( 481 bool DesktopRootWindowHostLinux::GrabSnapshot(
441 const gfx::Rect& snapshot_bounds, 482 const gfx::Rect& snapshot_bounds,
442 std::vector<unsigned char>* png_representation) { 483 std::vector<unsigned char>* png_representation) {
484 NOTIMPLEMENTED();
443 return false; 485 return false;
444 } 486 }
445 487
446 void DesktopRootWindowHostLinux::PostNativeEvent( 488 void DesktopRootWindowHostLinux::PostNativeEvent(
447 const base::NativeEvent& native_event) { 489 const base::NativeEvent& native_event) {
448 DCHECK(xwindow_); 490 DCHECK(xwindow_);
449 DCHECK(xdisplay_); 491 DCHECK(xdisplay_);
450 XEvent xevent = *native_event; 492 XEvent xevent = *native_event;
451 xevent.xany.display = xdisplay_; 493 xevent.xany.display = xdisplay_;
452 xevent.xany.window = xwindow_; 494 xevent.xany.window = xwindow_;
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 return true; 734 return true;
693 } 735 }
694 736
695 //////////////////////////////////////////////////////////////////////////////// 737 ////////////////////////////////////////////////////////////////////////////////
696 // DesktopRootWindowHost, public: 738 // DesktopRootWindowHost, public:
697 739
698 // static 740 // static
699 DesktopRootWindowHost* DesktopRootWindowHost::Create( 741 DesktopRootWindowHost* DesktopRootWindowHost::Create(
700 internal::NativeWidgetDelegate* native_widget_delegate, 742 internal::NativeWidgetDelegate* native_widget_delegate,
701 const gfx::Rect& initial_bounds) { 743 const gfx::Rect& initial_bounds) {
702 return new DesktopRootWindowHostLinux; 744 return new DesktopRootWindowHostLinux(native_widget_delegate, initial_bounds);
703 } 745 }
704 746
705 } // namespace views 747 } // namespace views
OLDNEW
« ui/aura/desktop/desktop_layout_manager.h ('K') | « 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