Re: [gtk-list] Re: Odd behaviour on GtkEntry

I found a way to make the cursor display properly on these NDS terminals
I don't know why it works (except for the terminals being stupid), but
it does.

Changing the lines in gtkentry.c from

	gdk_draw_line (drawable, widget->style->fg_gc[GTK_STATE_NORMAL],
			xoffset, INNER_BORDER,
			xoffset, text_area_height - INNER_BORDER);


	gdk_draw_line (drawable, widget->style->fg_gc[GTK_STATE_NORMAL],
			xoffset, 0,
			xoffset, text_area_height);

(i.e. lose the INNER_BORDER adjustment on the cursor draw), and it now
where it should. It is probably a taller cursor than it was designed to
be, but 
so far I haven't seen it display in the wrong position, and the size
isn't really noticeable.

Is there some reason to adjust the cursor to less than full height of
the entry?
(just hoping I won't have to patch each new version before installing on

Derek Simkowiak wrote:
> > Definitely looks like something broken on how gdk_draw_lines is
> > handled by the Xterminal. I think I'll try displaying something else
> > for the cursor just to see what happens.
>         Keep us updated!  I'm fascinated by old terminal hardware.  This
> is a very interesting problem.
>         See how gdk_draw_lines is implemented.  The acid test will be
> whether a test program written with gdk_draw_lines behaves any differently
> from XDrawLines (or XDrawLine, depending on how gdk_draw_lines was
> implemented).

gtk_draw_line looks like it is just a wrapper around XDrawLine, with
sanity checks before calling it.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]