Chromium Code Reviews| 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 <strings.h> | 7 #include <strings.h> |
| 8 #include <X11/cursorfont.h> | 8 #include <X11/cursorfont.h> |
| 9 #include <X11/extensions/Xfixes.h> | 9 #include <X11/extensions/Xfixes.h> |
| 10 #include <X11/extensions/XInput2.h> | 10 #include <X11/extensions/XInput2.h> |
| (...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 827 } | 827 } |
| 828 | 828 |
| 829 void RootWindowHostLinux::OnDeviceScaleFactorChanged( | 829 void RootWindowHostLinux::OnDeviceScaleFactorChanged( |
| 830 float device_scale_factor) { | 830 float device_scale_factor) { |
| 831 } | 831 } |
| 832 | 832 |
| 833 void RootWindowHostLinux::PrepareForShutdown() { | 833 void RootWindowHostLinux::PrepareForShutdown() { |
| 834 base::MessagePumpAuraX11::Current()->RemoveDispatcherForWindow(xwindow_); | 834 base::MessagePumpAuraX11::Current()->RemoveDispatcherForWindow(xwindow_); |
| 835 } | 835 } |
| 836 | 836 |
| 837 void RootWindowHostLinux::SetIntProperty(const std::string& name, int value) { | |
| 838 ui::SetIntProperty( | |
| 839 xwindow_, name.c_str(), XGetAtomName(xdisplay_, XA_CARDINAL), value); | |
|
Daniel Erat
2013/01/30 23:52:46
hmm, don't use XGetAtomName() here; it does a roun
oshima
2013/01/31 00:04:56
Ah, sorry I misunderstood what you were asking. do
| |
| 840 } | |
| 841 | |
| 837 bool RootWindowHostLinux::DispatchEventForRootWindow( | 842 bool RootWindowHostLinux::DispatchEventForRootWindow( |
| 838 const base::NativeEvent& event) { | 843 const base::NativeEvent& event) { |
| 839 switch (event->type) { | 844 switch (event->type) { |
| 840 case ConfigureNotify: | 845 case ConfigureNotify: |
| 841 DCHECK_EQ(x_root_window_, event->xconfigure.event); | 846 DCHECK_EQ(x_root_window_, event->xconfigure.event); |
| 842 x_root_bounds_.SetRect(event->xconfigure.x, event->xconfigure.y, | 847 x_root_bounds_.SetRect(event->xconfigure.x, event->xconfigure.y, |
| 843 event->xconfigure.width, event->xconfigure.height); | 848 event->xconfigure.width, event->xconfigure.height); |
| 844 break; | 849 break; |
| 845 | 850 |
| 846 case GenericEvent: | 851 case GenericEvent: |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1007 return new RootWindowHostLinux(bounds); | 1012 return new RootWindowHostLinux(bounds); |
| 1008 } | 1013 } |
| 1009 | 1014 |
| 1010 // static | 1015 // static |
| 1011 gfx::Size RootWindowHost::GetNativeScreenSize() { | 1016 gfx::Size RootWindowHost::GetNativeScreenSize() { |
| 1012 ::Display* xdisplay = base::MessagePumpAuraX11::GetDefaultXDisplay(); | 1017 ::Display* xdisplay = base::MessagePumpAuraX11::GetDefaultXDisplay(); |
| 1013 return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0)); | 1018 return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0)); |
| 1014 } | 1019 } |
| 1015 | 1020 |
| 1016 } // namespace aura | 1021 } // namespace aura |
| OLD | NEW |