| 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 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 | 282 |
| 283 // TODO(sadrul): reenable once 103981 is fixed. | 283 // TODO(sadrul): reenable once 103981 is fixed. |
| 284 #if defined(TOUCH_UI) | 284 #if defined(TOUCH_UI) |
| 285 if (base::MessagePumpForUI::HasXInput2()) | 285 if (base::MessagePumpForUI::HasXInput2()) |
| 286 ui::TouchFactory::GetInstance()->SetupXI2ForXWindow(xwindow_); | 286 ui::TouchFactory::GetInstance()->SetupXI2ForXWindow(xwindow_); |
| 287 #endif | 287 #endif |
| 288 } | 288 } |
| 289 | 289 |
| 290 DesktopHostLinux::~DesktopHostLinux() { | 290 DesktopHostLinux::~DesktopHostLinux() { |
| 291 XDestroyWindow(xdisplay_, xwindow_); | 291 XDestroyWindow(xdisplay_, xwindow_); |
| 292 |
| 293 // Clears XCursorCache. |
| 294 ui::GetXCursor(ui::kCursorClearXCursorCache); |
| 292 } | 295 } |
| 293 | 296 |
| 294 base::MessagePumpDispatcher::DispatchStatus DesktopHostLinux::Dispatch( | 297 base::MessagePumpDispatcher::DispatchStatus DesktopHostLinux::Dispatch( |
| 295 XEvent* xev) { | 298 XEvent* xev) { |
| 296 bool handled = false; | 299 bool handled = false; |
| 297 switch (xev->type) { | 300 switch (xev->type) { |
| 298 case Expose: | 301 case Expose: |
| 299 desktop_->Draw(); | 302 desktop_->Draw(); |
| 300 handled = true; | 303 handled = true; |
| 301 break; | 304 break; |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 492 return new DesktopHostLinux(bounds); | 495 return new DesktopHostLinux(bounds); |
| 493 } | 496 } |
| 494 | 497 |
| 495 // static | 498 // static |
| 496 gfx::Size DesktopHost::GetNativeDisplaySize() { | 499 gfx::Size DesktopHost::GetNativeDisplaySize() { |
| 497 ::Display* xdisplay = base::MessagePumpX::GetDefaultXDisplay(); | 500 ::Display* xdisplay = base::MessagePumpX::GetDefaultXDisplay(); |
| 498 return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0)); | 501 return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0)); |
| 499 } | 502 } |
| 500 | 503 |
| 501 } // namespace aura | 504 } // namespace aura |
| OLD | NEW |