Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Side by Side Diff: ui/aura/root_window_host_linux.cc

Issue 12047111: Set scale/orientation property to aura root window (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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::SetHostWindowProperty(const std::string& name,
838 int value) {
839 ui::SetIntProperty(xwindow_,
840 name.c_str(),
841 name.c_str(),
Daniel Erat 2013/01/30 21:04:27 i think that the type should be CARDINAL instead
oshima 2013/01/30 23:45:53 Done.
842 value);
843 }
844
837 bool RootWindowHostLinux::DispatchEventForRootWindow( 845 bool RootWindowHostLinux::DispatchEventForRootWindow(
838 const base::NativeEvent& event) { 846 const base::NativeEvent& event) {
839 switch (event->type) { 847 switch (event->type) {
840 case ConfigureNotify: 848 case ConfigureNotify:
841 DCHECK_EQ(x_root_window_, event->xconfigure.event); 849 DCHECK_EQ(x_root_window_, event->xconfigure.event);
842 x_root_bounds_.SetRect(event->xconfigure.x, event->xconfigure.y, 850 x_root_bounds_.SetRect(event->xconfigure.x, event->xconfigure.y,
843 event->xconfigure.width, event->xconfigure.height); 851 event->xconfigure.width, event->xconfigure.height);
844 break; 852 break;
845 853
846 case GenericEvent: 854 case GenericEvent:
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
1007 return new RootWindowHostLinux(bounds); 1015 return new RootWindowHostLinux(bounds);
1008 } 1016 }
1009 1017
1010 // static 1018 // static
1011 gfx::Size RootWindowHost::GetNativeScreenSize() { 1019 gfx::Size RootWindowHost::GetNativeScreenSize() {
1012 ::Display* xdisplay = base::MessagePumpAuraX11::GetDefaultXDisplay(); 1020 ::Display* xdisplay = base::MessagePumpAuraX11::GetDefaultXDisplay();
1013 return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0)); 1021 return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0));
1014 } 1022 }
1015 1023
1016 } // namespace aura 1024 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698