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

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: 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
« no previous file with comments | « ui/aura/root_window_host_linux.h ('k') | ui/aura/root_window_host_win.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1150 matching lines...) Expand 10 before | Expand all | Expand 10 after
1161 break; 1161 break;
1162 } 1162 }
1163 XSendEvent(xdisplay_, xwindow_, False, 0, &xevent); 1163 XSendEvent(xdisplay_, xwindow_, False, 0, &xevent);
1164 } 1164 }
1165 1165
1166 void RootWindowHostLinux::OnDeviceScaleFactorChanged( 1166 void RootWindowHostLinux::OnDeviceScaleFactorChanged(
1167 float device_scale_factor) { 1167 float device_scale_factor) {
1168 image_cursors_->Reload(device_scale_factor); 1168 image_cursors_->Reload(device_scale_factor);
1169 } 1169 }
1170 1170
1171 void RootWindowHostLinux::PrepareForShutdown() {
1172 base::MessagePumpAuraX11::Current()->RemoveDispatcherForWindow(xwindow_);
1173 }
1174
1171 bool RootWindowHostLinux::IsWindowManagerPresent() { 1175 bool RootWindowHostLinux::IsWindowManagerPresent() {
1172 // Per ICCCM 2.8, "Manager Selections", window managers should take ownership 1176 // Per ICCCM 2.8, "Manager Selections", window managers should take ownership
1173 // of WM_Sn selections (where n is a screen number). 1177 // of WM_Sn selections (where n is a screen number).
1174 return XGetSelectionOwner( 1178 return XGetSelectionOwner(
1175 xdisplay_, atom_cache_.GetAtom("WM_S0")) != None; 1179 xdisplay_, atom_cache_.GetAtom("WM_S0")) != None;
1176 } 1180 }
1177 1181
1178 void RootWindowHostLinux::SetCursorInternal(gfx::NativeCursor cursor) { 1182 void RootWindowHostLinux::SetCursorInternal(gfx::NativeCursor cursor) {
1179 // At times the cursor on the RootWindow is set before it is displayed. So 1183 // At times the cursor on the RootWindow is set before it is displayed. So
1180 // make sure the image-cursors are initialized properly before setting it. 1184 // make sure the image-cursors are initialized properly before setting it.
(...skipping 26 matching lines...) Expand all
1207 ui::ViewProp::GetValue(accelerated_widget, kRootWindowHostLinuxKey)); 1211 ui::ViewProp::GetValue(accelerated_widget, kRootWindowHostLinuxKey));
1208 } 1212 }
1209 1213
1210 // static 1214 // static
1211 gfx::Size RootWindowHost::GetNativeScreenSize() { 1215 gfx::Size RootWindowHost::GetNativeScreenSize() {
1212 ::Display* xdisplay = base::MessagePumpAuraX11::GetDefaultXDisplay(); 1216 ::Display* xdisplay = base::MessagePumpAuraX11::GetDefaultXDisplay();
1213 return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0)); 1217 return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0));
1214 } 1218 }
1215 1219
1216 } // namespace aura 1220 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/root_window_host_linux.h ('k') | ui/aura/root_window_host_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698