| 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 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 585 xevent.xmotion.x_root = point.x(); | 585 xevent.xmotion.x_root = point.x(); |
| 586 xevent.xmotion.y_root = point.y(); | 586 xevent.xmotion.y_root = point.y(); |
| 587 } | 587 } |
| 588 default: | 588 default: |
| 589 break; | 589 break; |
| 590 } | 590 } |
| 591 XSendEvent(xdisplay_, xwindow_, False, 0, &xevent); | 591 XSendEvent(xdisplay_, xwindow_, False, 0, &xevent); |
| 592 } | 592 } |
| 593 | 593 |
| 594 void DesktopHostLinux::WillDestroyCurrentMessageLoop() { | 594 void DesktopHostLinux::WillDestroyCurrentMessageLoop() { |
| 595 desktop_->DeleteInstance(); | 595 aura::Desktop::DeleteInstance(); |
| 596 } | 596 } |
| 597 | 597 |
| 598 bool DesktopHostLinux::IsWindowManagerPresent() { | 598 bool DesktopHostLinux::IsWindowManagerPresent() { |
| 599 // Per ICCCM 2.8, "Manager Selections", window managers should take ownership | 599 // Per ICCCM 2.8, "Manager Selections", window managers should take ownership |
| 600 // of WM_Sn selections (where n is a screen number). | 600 // of WM_Sn selections (where n is a screen number). |
| 601 ::Atom wm_s0_atom = XInternAtom(xdisplay_, "WM_S0", False); | 601 ::Atom wm_s0_atom = XInternAtom(xdisplay_, "WM_S0", False); |
| 602 return XGetSelectionOwner(xdisplay_, wm_s0_atom) != None; | 602 return XGetSelectionOwner(xdisplay_, wm_s0_atom) != None; |
| 603 } | 603 } |
| 604 | 604 |
| 605 } // namespace | 605 } // namespace |
| 606 | 606 |
| 607 // static | 607 // static |
| 608 DesktopHost* DesktopHost::Create(const gfx::Rect& bounds) { | 608 DesktopHost* DesktopHost::Create(const gfx::Rect& bounds) { |
| 609 return new DesktopHostLinux(bounds); | 609 return new DesktopHostLinux(bounds); |
| 610 } | 610 } |
| 611 | 611 |
| 612 // static | 612 // static |
| 613 gfx::Size DesktopHost::GetNativeScreenSize() { | 613 gfx::Size DesktopHost::GetNativeScreenSize() { |
| 614 ::Display* xdisplay = base::MessagePumpX::GetDefaultXDisplay(); | 614 ::Display* xdisplay = base::MessagePumpX::GetDefaultXDisplay(); |
| 615 return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0)); | 615 return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0)); |
| 616 } | 616 } |
| 617 | 617 |
| 618 } // namespace aura | 618 } // namespace aura |
| OLD | NEW |