| Index: chrome/common/gtk_util.cc
|
| diff --git a/chrome/common/gtk_util.cc b/chrome/common/gtk_util.cc
|
| index 37fb13e9165d48abcba6e316c624678e8969a172..d5e0885598fd7aba5239072efb2218c354a0770b 100644
|
| --- a/chrome/common/gtk_util.cc
|
| +++ b/chrome/common/gtk_util.cc
|
| @@ -461,11 +461,19 @@ GtkWidget* IndentWidget(GtkWidget* content) {
|
| void UpdateGtkFontSettings(RendererPreferences* prefs) {
|
| DCHECK(prefs);
|
|
|
| + // From http://library.gnome.org/devel/gtk/unstable/GtkSettings.html, this is
|
| + // the default value for gtk-cursor-blink-time.
|
| + static const gint kGtkDefaultCursorBlinkTime = 1200;
|
| +
|
| + gint cursor_blink_time = kGtkDefaultCursorBlinkTime;
|
| + gboolean cursor_blink = TRUE;
|
| gint antialias = 0;
|
| gint hinting = 0;
|
| gchar* hint_style = NULL;
|
| gchar* rgba_style = NULL;
|
| g_object_get(gtk_settings_get_default(),
|
| + "gtk-cursor-blink-time", &cursor_blink_time,
|
| + "gtk-cursor-blink", &cursor_blink,
|
| "gtk-xft-antialias", &antialias,
|
| "gtk-xft-hinting", &hinting,
|
| "gtk-xft-hintstyle", &hint_style,
|
| @@ -478,6 +486,15 @@ void UpdateGtkFontSettings(RendererPreferences* prefs) {
|
| prefs->subpixel_rendering =
|
| RENDERER_PREFERENCES_SUBPIXEL_RENDERING_SYSTEM_DEFAULT;
|
|
|
| + if (cursor_blink) {
|
| + // Dividing by 2*1000ms follows the WebKit GTK port and makes the blink
|
| + // frequency appear similar to the omnibox. Without this the blink is too
|
| + // slow.
|
| + prefs->caret_blink_interval = cursor_blink_time / 2000.;
|
| + } else {
|
| + prefs->caret_blink_interval = 0;
|
| + }
|
| +
|
| // g_object_get() doesn't tell us whether the properties were present or not,
|
| // but if they aren't (because gnome-settings-daemon isn't running), we'll get
|
| // NULL values for the strings.
|
|
|