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

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

Issue 10909043: Cancel drag if display configuration changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: win fix, adjust test screen size Created 8 years, 3 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 <X11/cursorfont.h> 7 #include <X11/cursorfont.h>
8 #include <X11/extensions/Xfixes.h> 8 #include <X11/extensions/Xfixes.h>
9 #include <X11/extensions/XInput2.h> 9 #include <X11/extensions/XInput2.h>
10 #include <X11/extensions/Xrandr.h> 10 #include <X11/extensions/Xrandr.h>
(...skipping 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after
1090 break; 1090 break;
1091 } 1091 }
1092 XSendEvent(xdisplay_, xwindow_, False, 0, &xevent); 1092 XSendEvent(xdisplay_, xwindow_, False, 0, &xevent);
1093 } 1093 }
1094 1094
1095 void RootWindowHostLinux::OnDeviceScaleFactorChanged( 1095 void RootWindowHostLinux::OnDeviceScaleFactorChanged(
1096 float device_scale_factor) { 1096 float device_scale_factor) {
1097 image_cursors_->Reload(device_scale_factor); 1097 image_cursors_->Reload(device_scale_factor);
1098 } 1098 }
1099 1099
1100 void RootWindowHostLinux::StopListeningEvents() {
1101 base::MessagePumpAuraX11::Current()->RemoveDispatcherForWindow(xwindow_);
1102 }
1103
1100 bool RootWindowHostLinux::IsWindowManagerPresent() { 1104 bool RootWindowHostLinux::IsWindowManagerPresent() {
1101 // Per ICCCM 2.8, "Manager Selections", window managers should take ownership 1105 // Per ICCCM 2.8, "Manager Selections", window managers should take ownership
1102 // of WM_Sn selections (where n is a screen number). 1106 // of WM_Sn selections (where n is a screen number).
1103 return XGetSelectionOwner( 1107 return XGetSelectionOwner(
1104 xdisplay_, atom_cache_.GetAtom("WM_S0")) != None; 1108 xdisplay_, atom_cache_.GetAtom("WM_S0")) != None;
1105 } 1109 }
1106 1110
1107 void RootWindowHostLinux::SetCursorInternal(gfx::NativeCursor cursor) { 1111 void RootWindowHostLinux::SetCursorInternal(gfx::NativeCursor cursor) {
1108 // At times the cursor on the RootWindow is set before it is displayed. So 1112 // At times the cursor on the RootWindow is set before it is displayed. So
1109 // make sure the image-cursors are initialized properly before setting it. 1113 // make sure the image-cursors are initialized properly before setting it.
(...skipping 26 matching lines...) Expand all
1136 ui::ViewProp::GetValue(accelerated_widget, kRootWindowHostLinuxKey)); 1140 ui::ViewProp::GetValue(accelerated_widget, kRootWindowHostLinuxKey));
1137 } 1141 }
1138 1142
1139 // static 1143 // static
1140 gfx::Size RootWindowHost::GetNativeScreenSize() { 1144 gfx::Size RootWindowHost::GetNativeScreenSize() {
1141 ::Display* xdisplay = base::MessagePumpAuraX11::GetDefaultXDisplay(); 1145 ::Display* xdisplay = base::MessagePumpAuraX11::GetDefaultXDisplay();
1142 return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0)); 1146 return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0));
1143 } 1147 }
1144 1148
1145 } // namespace aura 1149 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698