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