| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/root_window_host_linux.h" | 5 #include "ui/aura/root_window_host_linux.h" |
| 6 | 6 |
| 7 #include <X11/Xatom.h> | 7 #include <X11/Xatom.h> |
| 8 #include <X11/Xcursor/Xcursor.h> | 8 #include <X11/Xcursor/Xcursor.h> |
| 9 #include <X11/Xlib.h> | 9 #include <X11/Xlib.h> |
| 10 #include <X11/cursorfont.h> | 10 #include <X11/cursorfont.h> |
| (...skipping 696 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 707 // If there's no window manager running, we need to assign the X input | 707 // If there's no window manager running, we need to assign the X input |
| 708 // focus to our host window. | 708 // focus to our host window. |
| 709 if (!IsWindowManagerPresent() && focus_when_shown_) | 709 if (!IsWindowManagerPresent() && focus_when_shown_) |
| 710 XSetInputFocus(xdisplay_, xwindow_, RevertToNone, CurrentTime); | 710 XSetInputFocus(xdisplay_, xwindow_, RevertToNone, CurrentTime); |
| 711 break; | 711 break; |
| 712 } | 712 } |
| 713 case ClientMessage: { | 713 case ClientMessage: { |
| 714 Atom message_type = static_cast<Atom>(xev->xclient.data.l[0]); | 714 Atom message_type = static_cast<Atom>(xev->xclient.data.l[0]); |
| 715 if (message_type == atom_cache_.GetAtom("WM_DELETE_WINDOW")) { | 715 if (message_type == atom_cache_.GetAtom("WM_DELETE_WINDOW")) { |
| 716 // We have received a close message from the window manager. | 716 // We have received a close message from the window manager. |
| 717 delegate_->AsRootWindow()->OnRootWindowHostClosed(); | 717 delegate_->AsRootWindow()->OnRootWindowHostCloseRequested(); |
| 718 } else if (message_type == atom_cache_.GetAtom("_NET_WM_PING")) { | 718 } else if (message_type == atom_cache_.GetAtom("_NET_WM_PING")) { |
| 719 XEvent reply_event = *xev; | 719 XEvent reply_event = *xev; |
| 720 reply_event.xclient.window = x_root_window_; | 720 reply_event.xclient.window = x_root_window_; |
| 721 | 721 |
| 722 XSendEvent(xdisplay_, | 722 XSendEvent(xdisplay_, |
| 723 reply_event.xclient.window, | 723 reply_event.xclient.window, |
| 724 False, | 724 False, |
| 725 SubstructureRedirectMask | SubstructureNotifyMask, | 725 SubstructureRedirectMask | SubstructureNotifyMask, |
| 726 &reply_event); | 726 &reply_event); |
| 727 } | 727 } |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1054 ui::ViewProp::GetValue(accelerated_widget, kRootWindowHostLinuxKey)); | 1054 ui::ViewProp::GetValue(accelerated_widget, kRootWindowHostLinuxKey)); |
| 1055 } | 1055 } |
| 1056 | 1056 |
| 1057 // static | 1057 // static |
| 1058 gfx::Size RootWindowHost::GetNativeScreenSize() { | 1058 gfx::Size RootWindowHost::GetNativeScreenSize() { |
| 1059 ::Display* xdisplay = base::MessagePumpAuraX11::GetDefaultXDisplay(); | 1059 ::Display* xdisplay = base::MessagePumpAuraX11::GetDefaultXDisplay(); |
| 1060 return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0)); | 1060 return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0)); |
| 1061 } | 1061 } |
| 1062 | 1062 |
| 1063 } // namespace aura | 1063 } // namespace aura |
| OLD | NEW |