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

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::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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698