From 08b851dd0f01c8d72413d81c08a6bee04892cd21 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Mon, 6 Jul 2015 13:48:31 +0800 Subject: [PATCH] Load cursor from current module --- brightray/browser/browser_main_parts.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/brightray/browser/browser_main_parts.cc b/brightray/browser/browser_main_parts.cc index 2133170793..807e502249 100644 --- a/brightray/browser/browser_main_parts.cc +++ b/brightray/browser/browser_main_parts.cc @@ -37,6 +37,7 @@ #endif #if defined(OS_WIN) +#include "ui/base/cursor/cursor_loader_win.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/l10n/l10n_util_win.h" #include "ui/gfx/platform_font_win.h" @@ -105,6 +106,10 @@ void BrowserMainParts::ToolkitInitialized() { #if defined(OS_WIN) gfx::PlatformFontWin::adjust_font_callback = &AdjustUIFont; gfx::PlatformFontWin::get_minimum_font_size_callback = &GetMinimumFontSize; + + wchar_t module_name[MAX_PATH] = { 0 }; + if (GetModuleFileName(NULL, module_name, MAX_PATH)) + ui::CursorLoaderWin::SetCursorResourceModule(module_name); #endif }