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

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

Issue 10817016: aura: Fix "not-allowed" cursor and hot-points of some other cursors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | « no previous file | no next file » | 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/Xatom.h> 7 #include <X11/Xatom.h>
8 #include <X11/Xcursor/Xcursor.h> 8 #include <X11/Xcursor/Xcursor.h>
9 #include <X11/Xlib.h> 9 #include <X11/Xlib.h>
10 #include <X11/cursorfont.h> 10 #include <X11/cursorfont.h>
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 public: 315 public:
316 ImageCursors() : scale_factor_(0.0) { 316 ImageCursors() : scale_factor_(0.0) {
317 } 317 }
318 318
319 void Reload(float scale_factor) { 319 void Reload(float scale_factor) {
320 if (scale_factor_ == scale_factor) 320 if (scale_factor_ == scale_factor)
321 return; 321 return;
322 scale_factor_ = scale_factor; 322 scale_factor_ = scale_factor;
323 UnloadAll(); 323 UnloadAll();
324 // The cursor's hot points are defined in chromeos's 324 // The cursor's hot points are defined in chromeos's
325 // src/platforms/assets/cursors/*.cfg files. 325 // src/platforms/assets/cursors/*.cfg files.
sky 2012/07/23 23:00:57 Is there some better way to communicate this so th
varunjain 2012/07/25 16:38:28 Actually this is inaccurate. We have new cursor im
326 LoadImageCursor(ui::kCursorNull, IDR_AURA_CURSOR_PTR, 9, 5); 326 LoadImageCursor(ui::kCursorNull, IDR_AURA_CURSOR_PTR, 8, 3);
327 LoadImageCursor(ui::kCursorPointer, IDR_AURA_CURSOR_PTR, 9, 5); 327 LoadImageCursor(ui::kCursorPointer, IDR_AURA_CURSOR_PTR, 8, 3);
328 LoadImageCursor(ui::kCursorNoDrop, IDR_AURA_CURSOR_NO_DROP, 9, 5); 328 LoadImageCursor(ui::kCursorNoDrop, IDR_AURA_CURSOR_NO_DROP, 5, 4);
329 LoadImageCursor(ui::kCursorCopy, IDR_AURA_CURSOR_COPY, 9, 5); 329 LoadImageCursor(ui::kCursorNotAllowed, IDR_AURA_CURSOR_NO_DROP, 5, 4);
330 LoadImageCursor(ui::kCursorCopy, IDR_AURA_CURSOR_COPY, 5, 5);
330 LoadImageCursor(ui::kCursorHand, IDR_AURA_CURSOR_HAND, 9, 4); 331 LoadImageCursor(ui::kCursorHand, IDR_AURA_CURSOR_HAND, 9, 4);
331 LoadImageCursor(ui::kCursorMove, IDR_AURA_CURSOR_MOVE, 12, 12); 332 LoadImageCursor(ui::kCursorMove, IDR_AURA_CURSOR_MOVE, 12, 12);
332 LoadImageCursor(ui::kCursorNorthEastResize, 333 LoadImageCursor(ui::kCursorNorthEastResize,
333 IDR_AURA_CURSOR_NORTH_EAST_RESIZE, 12, 11); 334 IDR_AURA_CURSOR_NORTH_EAST_RESIZE, 12, 11);
334 LoadImageCursor(ui::kCursorSouthWestResize, 335 LoadImageCursor(ui::kCursorSouthWestResize,
335 IDR_AURA_CURSOR_SOUTH_WEST_RESIZE, 12, 11); 336 IDR_AURA_CURSOR_SOUTH_WEST_RESIZE, 12, 11);
336 LoadImageCursor(ui::kCursorSouthEastResize, 337 LoadImageCursor(ui::kCursorSouthEastResize,
337 IDR_AURA_CURSOR_SOUTH_EAST_RESIZE, 11, 11); 338 IDR_AURA_CURSOR_SOUTH_EAST_RESIZE, 11, 11);
338 LoadImageCursor(ui::kCursorNorthWestResize, 339 LoadImageCursor(ui::kCursorNorthWestResize,
339 IDR_AURA_CURSOR_NORTH_WEST_RESIZE, 11, 11); 340 IDR_AURA_CURSOR_NORTH_WEST_RESIZE, 11, 11);
(...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after
1063 ui::ViewProp::GetValue(accelerated_widget, kRootWindowHostLinuxKey)); 1064 ui::ViewProp::GetValue(accelerated_widget, kRootWindowHostLinuxKey));
1064 } 1065 }
1065 1066
1066 // static 1067 // static
1067 gfx::Size RootWindowHost::GetNativeScreenSize() { 1068 gfx::Size RootWindowHost::GetNativeScreenSize() {
1068 ::Display* xdisplay = base::MessagePumpAuraX11::GetDefaultXDisplay(); 1069 ::Display* xdisplay = base::MessagePumpAuraX11::GetDefaultXDisplay();
1069 return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0)); 1070 return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0));
1070 } 1071 }
1071 1072
1072 } // namespace aura 1073 } // namespace aura
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698