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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 0, 0, 0); | 272 0, 0, 0); |
273 | 273 |
274 long event_mask = ButtonPressMask | ButtonReleaseMask | | 274 long event_mask = ButtonPressMask | ButtonReleaseMask | |
275 KeyPressMask | KeyReleaseMask | | 275 KeyPressMask | KeyReleaseMask | |
276 ExposureMask | VisibilityChangeMask | | 276 ExposureMask | VisibilityChangeMask | |
277 StructureNotifyMask | PropertyChangeMask | | 277 StructureNotifyMask | PropertyChangeMask | |
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 // TODO(sadrul): reenable once 103981 is fixed. |
| 283 #if defined(TOUCH_UI) |
282 if (base::MessagePumpForUI::HasXInput2()) | 284 if (base::MessagePumpForUI::HasXInput2()) |
283 ui::TouchFactory::GetInstance()->SetupXI2ForXWindow(xwindow_); | 285 ui::TouchFactory::GetInstance()->SetupXI2ForXWindow(xwindow_); |
| 286 #endif |
284 } | 287 } |
285 | 288 |
286 DesktopHostLinux::~DesktopHostLinux() { | 289 DesktopHostLinux::~DesktopHostLinux() { |
287 XDestroyWindow(xdisplay_, xwindow_); | 290 XDestroyWindow(xdisplay_, xwindow_); |
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) { |
(...skipping 194 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 |