After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 347373 - Invert characters' rendering when text cursor is fat
Invert characters' rendering when text cursor is fat
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: .General
unspecified
Other All
: Normal enhancement
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2006-07-13 08:24 UTC by Masatake YAMATO
Modified: 2015-12-22 00:28 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement



Description Masatake YAMATO 2006-07-13 08:24:22 UTC
I'm using following gtkrc to make the text cursor more strongly rendered:

  style "default"
  {
     GtkWidget::cursor-aspect-ratio = 1.0
  }
  class "GtkWidget" style "default"
  gtk-cursor-blink = 0

However, this setting is not useful: the characters under the cursor
is hidden by the fat cursor itself. The fat cursor may be one of general
requirements from shortsighted users.

Here is the patch:

2006-07-13  Masatake YAMATO  <jet@gyve.org>

	* gtk/gtkstyle.c (make_cursor_gc): Set GDK_NOR to cursor's gc.function.

Index: gtkstyle.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkstyle.c,v
retrieving revision 1.194
diff -u -r1.194 gtkstyle.c
--- gtkstyle.c	6 Jul 2006 05:14:02 -0000	1.194
+++ gtkstyle.c	13 Jul 2006 08:07:56 -0000
@@ -6576,7 +6576,10 @@
     }
   else
     gc_values.foreground = *fallback;
-  
+
+  gc_values_mask |= GDK_GC_FUNCTION;
+  gc_values.function = GDK_NOR;
+
   gdk_rgb_find_color (widget->style->colormap, &gc_values.foreground);
   return gtk_gc_get (widget->style->depth, widget->style->colormap, &gc_values, gc_values_mask);
 }
Comment 1 Masatake YAMATO 2006-07-13 08:25:53 UTC
I forgot to write what my patch does.
The patch inverts the rendering of text under the fat cursor.
Comment 2 Matthias Clasen 2015-12-22 00:28:53 UTC
the patch is clearly not relevant anymore, we have not been using gc's for drawing in many years.