| 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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 0, 0, 0); | 273 0, 0, 0); |
| 274 | 274 |
| 275 long event_mask = ButtonPressMask | ButtonReleaseMask | | 275 long event_mask = ButtonPressMask | ButtonReleaseMask | |
| 276 KeyPressMask | KeyReleaseMask | | 276 KeyPressMask | KeyReleaseMask | |
| 277 ExposureMask | VisibilityChangeMask | | 277 ExposureMask | VisibilityChangeMask | |
| 278 StructureNotifyMask | PropertyChangeMask | | 278 StructureNotifyMask | PropertyChangeMask | |
| 279 PointerMotionMask; | 279 PointerMotionMask; |
| 280 XSelectInput(xdisplay_, xwindow_, event_mask); | 280 XSelectInput(xdisplay_, xwindow_, event_mask); |
| 281 XFlush(xdisplay_); | 281 XFlush(xdisplay_); |
| 282 | 282 |
| 283 // TODO(sadrul): reenable once 103981 is fixed. | |
| 284 #if defined(TOUCH_UI) | |
| 285 if (base::MessagePumpForUI::HasXInput2()) | 283 if (base::MessagePumpForUI::HasXInput2()) |
| 286 ui::TouchFactory::GetInstance()->SetupXI2ForXWindow(xwindow_); | 284 ui::TouchFactory::GetInstance()->SetupXI2ForXWindow(xwindow_); |
| 287 #endif | |
| 288 } | 285 } |
| 289 | 286 |
| 290 DesktopHostLinux::~DesktopHostLinux() { | 287 DesktopHostLinux::~DesktopHostLinux() { |
| 291 XDestroyWindow(xdisplay_, xwindow_); | 288 XDestroyWindow(xdisplay_, xwindow_); |
| 292 | 289 |
| 293 // Clears XCursorCache. | 290 // Clears XCursorCache. |
| 294 ui::GetXCursor(ui::kCursorClearXCursorCache); | 291 ui::GetXCursor(ui::kCursorClearXCursorCache); |
| 295 } | 292 } |
| 296 | 293 |
| 297 base::MessagePumpDispatcher::DispatchStatus DesktopHostLinux::Dispatch( | 294 base::MessagePumpDispatcher::DispatchStatus DesktopHostLinux::Dispatch( |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 495 return new DesktopHostLinux(bounds); | 492 return new DesktopHostLinux(bounds); |
| 496 } | 493 } |
| 497 | 494 |
| 498 // static | 495 // static |
| 499 gfx::Size DesktopHost::GetNativeDisplaySize() { | 496 gfx::Size DesktopHost::GetNativeDisplaySize() { |
| 500 ::Display* xdisplay = base::MessagePumpX::GetDefaultXDisplay(); | 497 ::Display* xdisplay = base::MessagePumpX::GetDefaultXDisplay(); |
| 501 return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0)); | 498 return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0)); |
| 502 } | 499 } |
| 503 | 500 |
| 504 } // namespace aura | 501 } // namespace aura |
| OLD | NEW |