OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/desktop_host.h" | 5 #include "ui/aura/desktop_host.h" |
6 | 6 |
7 #include <X11/cursorfont.h> | 7 #include <X11/cursorfont.h> |
8 #include <X11/Xlib.h> | 8 #include <X11/Xlib.h> |
9 | 9 |
10 // Get rid of a macro from Xlib.h that conflicts with Aura's RootWindow class. | 10 // Get rid of a macro from Xlib.h that conflicts with Aura's RootWindow class. |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 PointerMotionMask; | 278 PointerMotionMask; |
279 XSelectInput(xdisplay_, xwindow_, event_mask); | 279 XSelectInput(xdisplay_, xwindow_, event_mask); |
280 XFlush(xdisplay_); | 280 XFlush(xdisplay_); |
281 | 281 |
282 if (base::MessagePumpForUI::HasXInput2()) | 282 if (base::MessagePumpForUI::HasXInput2()) |
283 ui::TouchFactory::GetInstance()->SetupXI2ForXWindow(xwindow_); | 283 ui::TouchFactory::GetInstance()->SetupXI2ForXWindow(xwindow_); |
284 } | 284 } |
285 | 285 |
286 DesktopHostLinux::~DesktopHostLinux() { | 286 DesktopHostLinux::~DesktopHostLinux() { |
287 XDestroyWindow(xdisplay_, xwindow_); | 287 XDestroyWindow(xdisplay_, xwindow_); |
| 288 |
| 289 // Clears XCursorCache. |
| 290 ui::GetXCursor(ui::kCursorClearXCursorCache); |
288 } | 291 } |
289 | 292 |
290 base::MessagePumpDispatcher::DispatchStatus DesktopHostLinux::Dispatch( | 293 base::MessagePumpDispatcher::DispatchStatus DesktopHostLinux::Dispatch( |
291 XEvent* xev) { | 294 XEvent* xev) { |
292 bool handled = false; | 295 bool handled = false; |
293 switch (xev->type) { | 296 switch (xev->type) { |
294 case Expose: | 297 case Expose: |
295 desktop_->Draw(); | 298 desktop_->Draw(); |
296 handled = true; | 299 handled = true; |
297 break; | 300 break; |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 return new DesktopHostLinux(bounds); | 491 return new DesktopHostLinux(bounds); |
489 } | 492 } |
490 | 493 |
491 // static | 494 // static |
492 gfx::Size DesktopHost::GetNativeDisplaySize() { | 495 gfx::Size DesktopHost::GetNativeDisplaySize() { |
493 ::Display* xdisplay = base::MessagePumpX::GetDefaultXDisplay(); | 496 ::Display* xdisplay = base::MessagePumpX::GetDefaultXDisplay(); |
494 return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0)); | 497 return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0)); |
495 } | 498 } |
496 | 499 |
497 } // namespace aura | 500 } // namespace aura |
OLD | NEW |