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 577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
588 xevent.xmotion.y_root = point.y(); | 588 xevent.xmotion.y_root = point.y(); |
589 } | 589 } |
590 default: | 590 default: |
591 break; | 591 break; |
592 } | 592 } |
593 Status status = XSendEvent(xdisplay_, xwindow_, False, 0, &xevent); | 593 Status status = XSendEvent(xdisplay_, xwindow_, False, 0, &xevent); |
594 DLOG(WARNING) << "PostEvent:" << xevent.type << ", status=" << status; | 594 DLOG(WARNING) << "PostEvent:" << xevent.type << ", status=" << status; |
595 } | 595 } |
596 | 596 |
597 void DesktopHostLinux::WillDestroyCurrentMessageLoop() { | 597 void DesktopHostLinux::WillDestroyCurrentMessageLoop() { |
598 desktop_->DeleteInstance(); | 598 aura::Desktop::DeleteInstance(); |
stevenjb
2011/12/02 01:30:55
Do we still need do this here?
oshima
2011/12/02 01:45:43
yes, for tests that does not depend chrome
| |
599 } | 599 } |
600 | 600 |
601 bool DesktopHostLinux::IsWindowManagerPresent() { | 601 bool DesktopHostLinux::IsWindowManagerPresent() { |
602 // Per ICCCM 2.8, "Manager Selections", window managers should take ownership | 602 // Per ICCCM 2.8, "Manager Selections", window managers should take ownership |
603 // of WM_Sn selections (where n is a screen number). | 603 // of WM_Sn selections (where n is a screen number). |
604 ::Atom wm_s0_atom = XInternAtom(xdisplay_, "WM_S0", False); | 604 ::Atom wm_s0_atom = XInternAtom(xdisplay_, "WM_S0", False); |
605 return XGetSelectionOwner(xdisplay_, wm_s0_atom) != None; | 605 return XGetSelectionOwner(xdisplay_, wm_s0_atom) != None; |
606 } | 606 } |
607 | 607 |
608 } // namespace | 608 } // namespace |
609 | 609 |
610 // static | 610 // static |
611 DesktopHost* DesktopHost::Create(const gfx::Rect& bounds) { | 611 DesktopHost* DesktopHost::Create(const gfx::Rect& bounds) { |
612 return new DesktopHostLinux(bounds); | 612 return new DesktopHostLinux(bounds); |
613 } | 613 } |
614 | 614 |
615 // static | 615 // static |
616 gfx::Size DesktopHost::GetNativeScreenSize() { | 616 gfx::Size DesktopHost::GetNativeScreenSize() { |
617 ::Display* xdisplay = base::MessagePumpX::GetDefaultXDisplay(); | 617 ::Display* xdisplay = base::MessagePumpX::GetDefaultXDisplay(); |
618 return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0)); | 618 return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0)); |
619 } | 619 } |
620 | 620 |
621 } // namespace aura | 621 } // namespace aura |
OLD | NEW |