Commit c563ba8c authored by Tom Anderson's avatar Tom Anderson Committed by Commit Bot

[XProto] Address hferreiro's review comments from r789288

R=hferreiro
BUG=1066670

Change-Id: Ifa76975393af60b056ec05326b1fc6252e6873a7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2378142
Auto-Submit: Thomas Anderson <thomasanderson@chromium.org>
Commit-Queue: Henrique Ferreiro <hferreiro@igalia.com>
Reviewed-by: default avatarHenrique Ferreiro <hferreiro@igalia.com>
Cr-Commit-Position: refs/heads/master@{#802190}
parent 770f5977
...@@ -122,7 +122,8 @@ std::string GetEnv(const std::string& var) { ...@@ -122,7 +122,8 @@ std::string GetEnv(const std::string& var) {
std::string CursorPath() { std::string CursorPath() {
constexpr const char kDefaultPath[] = constexpr const char kDefaultPath[] =
"~/.icons:/usr/share/icons:/usr/share/pixmaps:/usr/X11R6/lib/X11/icons"; "~/.local/share/icons:~/.icons:/usr/share/icons:/usr/share/pixmaps:"
"/usr/X11R6/lib/X11/icons";
std::string path = GetEnv("XCURSOR_PATH"); std::string path = GetEnv("XCURSOR_PATH");
return path.empty() ? kDefaultPath : path; return path.empty() ? kDefaultPath : path;
} }
...@@ -374,9 +375,12 @@ void XCursorLoader::LoadCursorImpl( ...@@ -374,9 +375,12 @@ void XCursorLoader::LoadCursorImpl(
} else { } else {
// Fallback to using a font cursor. // Fallback to using a font cursor.
auto core_char = CursorNamesToChar(names); auto core_char = CursorNamesToChar(names);
connection_->CreateGlyphCursor({xcursor, cursor_font_, cursor_font_, constexpr uint16_t kFontCursorFgColor = 0;
2 * core_char, 2 * core_char + 1, 0, 0, 0, constexpr uint16_t kFontCursorBgColor = 65535;
65535, 65535, 65535}); connection_->CreateGlyphCursor(
{xcursor, cursor_font_, cursor_font_, 2 * core_char, 2 * core_char + 1,
kFontCursorFgColor, kFontCursorFgColor, kFontCursorFgColor,
kFontCursorBgColor, kFontCursorBgColor, kFontCursorBgColor});
} }
cursor->SetCursor(xcursor); cursor->SetCursor(xcursor);
} }
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
#include "base/bind.h" #include "base/bind.h"
#include "base/command_line.h" #include "base/command_line.h"
#include "base/compiler_specific.h" #include "base/compiler_specific.h"
#include "base/debug/stack_trace.h"
#include "base/location.h" #include "base/location.h"
#include "base/logging.h" #include "base/logging.h"
#include "base/memory/ref_counted_memory.h" #include "base/memory/ref_counted_memory.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment