| Index: chrome/browser/ui/libgtk2ui/gtk2_ui.cc
|
| diff --git a/chrome/browser/ui/libgtk2ui/gtk2_ui.cc b/chrome/browser/ui/libgtk2ui/gtk2_ui.cc
|
| index c9d25bf01e9e97f73b4168472b4b11f73167003c..b9d22c54df66cab4cc011a046e24e2246264443b 100644
|
| --- a/chrome/browser/ui/libgtk2ui/gtk2_ui.cc
|
| +++ b/chrome/browser/ui/libgtk2ui/gtk2_ui.cc
|
| @@ -6,6 +6,7 @@
|
|
|
| #include <math.h>
|
| #include <pango/pango.h>
|
| +#include <X11/Xcursor/Xcursor.h>
|
| #include <set>
|
| #include <utility>
|
|
|
| @@ -49,6 +50,7 @@
|
| #include "ui/gfx/image/image_skia_source.h"
|
| #include "ui/gfx/skbitmap_operations.h"
|
| #include "ui/gfx/skia_util.h"
|
| +#include "ui/gfx/x/x11_types.h"
|
| #include "ui/native_theme/native_theme.h"
|
| #include "ui/resources/grit/ui_resources.h"
|
| #include "ui/views/controls/button/blue_button.h"
|
| @@ -508,9 +510,10 @@ void Gtk2UI::Initialize() {
|
| G_CALLBACK(OnThemeChanged),
|
| this);
|
|
|
| -
|
| LoadGtkValues();
|
|
|
| + LoadCursorTheme();
|
| +
|
| #if defined(ENABLE_BASIC_PRINTING)
|
| printing::PrintingContextLinux::SetCreatePrintDialogFunction(
|
| &PrintDialogGtk2::CreatePrintDialog);
|
| @@ -996,6 +999,24 @@ void Gtk2UI::LoadGtkValues() {
|
| theme->GetSystemColor(ui::NativeTheme::kColorId_ThrobberWaitingColor);
|
| }
|
|
|
| +void Gtk2UI::LoadCursorTheme() {
|
| + GtkSettings* settings = gtk_settings_get_default();
|
| +
|
| + gchar* theme = nullptr;
|
| + gint size = 0;
|
| + g_object_get(settings,
|
| + "gtk-cursor-theme-name", &theme,
|
| + "gtk-cursor-theme-size", &size,
|
| + nullptr);
|
| +
|
| + if (theme)
|
| + XcursorSetTheme(gfx::GetXDisplay(), theme);
|
| + if (size)
|
| + XcursorSetDefaultSize(gfx::GetXDisplay(), size);
|
| +
|
| + g_free(theme);
|
| +}
|
| +
|
| void Gtk2UI::UpdateMaterialDesignColors() {
|
| // TODO(varkha): This should be merged back into LoadGtkValues() once Material
|
| // Design is on unconditionally.
|
|
|