| OLD | NEW |
| 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/base/cursor/cursor_loader_x11.h" | 5 #include "ui/base/cursor/cursor_loader_x11.h" |
| 6 | 6 |
| 7 #include <float.h> | 7 #include <float.h> |
| 8 #include <X11/cursorfont.h> | 8 #include <X11/cursorfont.h> |
| 9 #include <X11/Xlib.h> | 9 #include <X11/Xlib.h> |
| 10 | 10 |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 } | 172 } |
| 173 NOTREACHED() << "Case not handled for " << id; | 173 NOTREACHED() << "Case not handled for " << id; |
| 174 return "left_ptr"; | 174 return "left_ptr"; |
| 175 } | 175 } |
| 176 | 176 |
| 177 static const struct { | 177 static const struct { |
| 178 const char* css_name; | 178 const char* css_name; |
| 179 const char* fallback_name; | 179 const char* fallback_name; |
| 180 int fallback_shape; | 180 int fallback_shape; |
| 181 } kCursorFallbacks[] = { | 181 } kCursorFallbacks[] = { |
| 182 { "pointer", "hand", XC_hand1 }, | 182 { "pointer", "hand", XC_hand2 }, |
| 183 { "progress", "left_ptr_watch", XC_watch }, | 183 { "progress", "left_ptr_watch", XC_watch }, |
| 184 { "wait", nullptr, XC_watch }, | 184 { "wait", nullptr, XC_watch }, |
| 185 { "cell", nullptr, XC_plus }, | 185 { "cell", nullptr, XC_plus }, |
| 186 { "all-scroll", nullptr, XC_fleur}, | 186 { "all-scroll", nullptr, XC_fleur}, |
| 187 { "crosshair", nullptr, XC_cross }, | 187 { "crosshair", nullptr, XC_cross }, |
| 188 { "text", nullptr, XC_xterm }, | 188 { "text", nullptr, XC_xterm }, |
| 189 { "not-allowed", "crossed_circle", None }, | 189 { "not-allowed", "crossed_circle", None }, |
| 190 { "grabbing", nullptr, XC_hand2 }, | 190 { "grabbing", nullptr, XC_hand2 }, |
| 191 { "col-resize", nullptr, XC_sb_h_double_arrow }, | 191 { "col-resize", nullptr, XC_sb_h_double_arrow }, |
| 192 { "row-resize", nullptr, XC_sb_v_double_arrow}, | 192 { "row-resize", nullptr, XC_sb_v_double_arrow}, |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 } | 349 } |
| 350 | 350 |
| 351 // As a last resort, return a left pointer. | 351 // As a last resort, return a left pointer. |
| 352 cursor = XCreateFontCursor(display_, XC_left_ptr); | 352 cursor = XCreateFontCursor(display_, XC_left_ptr); |
| 353 DCHECK(cursor); | 353 DCHECK(cursor); |
| 354 font_cursors_[id] = cursor; | 354 font_cursors_[id] = cursor; |
| 355 return cursor; | 355 return cursor; |
| 356 } | 356 } |
| 357 | 357 |
| 358 } // namespace ui | 358 } // namespace ui |
| OLD | NEW |