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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 long event_mask = ButtonPressMask | ButtonReleaseMask | | 334 long event_mask = ButtonPressMask | ButtonReleaseMask | |
335 KeyPressMask | KeyReleaseMask | | 335 KeyPressMask | KeyReleaseMask | |
336 EnterWindowMask | LeaveWindowMask | | 336 EnterWindowMask | LeaveWindowMask | |
337 ExposureMask | VisibilityChangeMask | | 337 ExposureMask | VisibilityChangeMask | |
338 StructureNotifyMask | PropertyChangeMask | | 338 StructureNotifyMask | PropertyChangeMask | |
339 PointerMotionMask; | 339 PointerMotionMask; |
340 XSelectInput(xdisplay_, xwindow_, event_mask); | 340 XSelectInput(xdisplay_, xwindow_, event_mask); |
341 XSelectInput(xdisplay_, root_window_, StructureNotifyMask); | 341 XSelectInput(xdisplay_, root_window_, StructureNotifyMask); |
342 XFlush(xdisplay_); | 342 XFlush(xdisplay_); |
343 | 343 |
| 344 // TODO(sad): Re-enable once crbug.com/106516 is fixed. |
| 345 #if 0 |
344 if (base::MessagePumpForUI::HasXInput2()) | 346 if (base::MessagePumpForUI::HasXInput2()) |
345 ui::TouchFactory::GetInstance()->SetupXI2ForXWindow(xwindow_); | 347 ui::TouchFactory::GetInstance()->SetupXI2ForXWindow(xwindow_); |
| 348 #endif |
346 | 349 |
347 base::MessagePumpX::SetDefaultDispatcher(this); | 350 base::MessagePumpX::SetDefaultDispatcher(this); |
348 MessageLoopForUI::current()->AddDestructionObserver(this); | 351 MessageLoopForUI::current()->AddDestructionObserver(this); |
349 } | 352 } |
350 | 353 |
351 DesktopHostLinux::~DesktopHostLinux() { | 354 DesktopHostLinux::~DesktopHostLinux() { |
352 XDestroyWindow(xdisplay_, xwindow_); | 355 XDestroyWindow(xdisplay_, xwindow_); |
353 | 356 |
354 // Clears XCursorCache. | 357 // Clears XCursorCache. |
355 ui::GetXCursor(ui::kCursorClearXCursorCache); | 358 ui::GetXCursor(ui::kCursorClearXCursorCache); |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
609 return new DesktopHostLinux(bounds); | 612 return new DesktopHostLinux(bounds); |
610 } | 613 } |
611 | 614 |
612 // static | 615 // static |
613 gfx::Size DesktopHost::GetNativeScreenSize() { | 616 gfx::Size DesktopHost::GetNativeScreenSize() { |
614 ::Display* xdisplay = base::MessagePumpX::GetDefaultXDisplay(); | 617 ::Display* xdisplay = base::MessagePumpX::GetDefaultXDisplay(); |
615 return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0)); | 618 return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0)); |
616 } | 619 } |
617 | 620 |
618 } // namespace aura | 621 } // namespace aura |
OLD | NEW |